01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Core License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
06: //
07: // $Id: SuperclassElement.java,v 1.1 2001/12/18 10:31:31 per_nyfelt Exp $
08:
09: package org.ozoneDB.core.xml;
10:
11: import org.xml.sax.*;
12:
13: /**
14: * This class saves all attributes of the superclassElement.
15: *
16: * @version $Revision: 1.1 $
17: * @author <a href="http://www.softwarebuero.de">SMB</a>
18: */
19: public class SuperclassElement implements Consts {
20:
21: //
22: // member
23: //
24:
25: /**
26: * The type of the superclass.
27: */
28: private String type;
29:
30: /**
31: */
32: private Class super class;
33:
34: /**
35: */
36: private Object obj;
37:
38: //
39: // constructor
40: //
41:
42: /**
43: */
44: public SuperclassElement() {
45: }
46:
47: /**
48: * @param obj (the obj of the extended-class)
49: * @param atts (the attributes)
50: */
51: public SuperclassElement(Object obj, Attributes atts)
52: throws ClassNotFoundException {
53: this .obj = obj;
54:
55: type = atts.getValue(ATTR_TYPE);
56: super class = Thread.currentThread().getContextClassLoader()
57: .loadClass(type);
58: // this.obj = superclass.newInstance();
59: }
60:
61: //
62: // methods
63: //
64:
65: /**
66: */
67: public String getType() {
68: return type;
69: }
70:
71: /**
72: */
73: public Class getSuperclass() {
74: return super class;
75: }
76:
77: /**
78: */
79: public Object getObject() {
80: return obj;
81: }
82:
83: /**
84: */
85: public String toString() {
86: return ("SuperclassElement: " + type);
87: }
88: }
|