KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > core > xml > SuperclassElement


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Core License version 1 published by ozone-db.org.
3
//
4
// The original code and portions created by SMB are
5
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
6
//
7
// $Id: SuperclassElement.java,v 1.2 2002/08/27 08:32:26 per_nyfelt Exp $
8

9 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.2 $
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 JavaDoc type;
29
30     /**
31      */

32     private Class JavaDoc superclass;
33
34     /**
35      */

36     private Object JavaDoc 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 JavaDoc obj, Attributes atts)
52     throws ClassNotFoundException JavaDoc {
53         this.obj = obj;
54
55         type = atts.getValue(ATTR_TYPE);
56         superclass = Thread.currentThread().getContextClassLoader().loadClass(type);
57 // this.obj = superclass.newInstance();
58
}
59
60     //
61
// methods
62
//
63

64     /**
65      */

66     public String JavaDoc getType() {
67         return type;
68     }
69
70     /**
71      */

72     public Class JavaDoc getSuperclass() {
73         return superclass;
74     }
75
76     /**
77      */

78     public Object JavaDoc getObject() {
79         return obj;
80     }
81
82     /**
83      */

84     public String JavaDoc toString() {
85         return ("SuperclassElement: " + type);
86     }
87 }
88
89
Popular Tags