|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.exolab.javasource.JType
org.exolab.javasource.JStructure
org.exolab.javasource.JClass
org.exolab.javasource.JEnum
Class describes the definition of a enum type class
| Nested Class Summary |
| Nested classes inherited from class org.exolab.javasource.JClass |
JClass.JInnerClass |
| Field Summary |
| Fields inherited from class org.exolab.javasource.JClass |
_constructors, _fields, _innerClasses, _methods, _staticInitializer, _superClass, DEFAULT_HEADER, version |
| Fields inherited from class org.exolab.javasource.JType |
Boolean, Byte, Char, Double, Float, Int, Long, Short |
| Constructor Summary | |
protected |
JEnum(java.lang.String name)
|
| Method Summary | |
void |
addConstant(JEnumConstant jConstant)
Adds the given JEnumConstant to this JEnum |
void |
addMember(JMember jMember)
Adds the given JMember to this JAnnotationType |
JEnumConstant |
getConstant(java.lang.String name)
Returns the member with the given name, or null if no member was found with the given name |
JEnumConstant[] |
getConstants()
Returns an array of all the JEnumConstant of this JEnum |
static void |
main(java.lang.String[] args)
Test drive |
void |
print(JSourceWriter jsw)
Prints the source code for this JEnum to the given JSourceWriter |
void |
setSuperClass(java.lang.String superClass)
Sets the super Class that this class extends |
| Methods inherited from class org.exolab.javasource.JType |
changePackage, createArray, getComponentType, getLocalName, getName, isArray, isPrimitive, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected JEnum(java.lang.String name)
throws java.lang.IllegalArgumentException
name -
java.lang.IllegalArgumentException| Method Detail |
public void addMember(JMember jMember)
throws java.lang.IllegalArgumentException
addMember in class JClassjava.lang.IllegalArgumentException - when the given
JMember has the same name of an existing JEnumConstant
or if the JMember is of an unrecognized class.
public void addConstant(JEnumConstant jConstant)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - when the given
JEnumConstant has the same name of an existing JEnumConstant.public JEnumConstant getConstant(java.lang.String name)
name - the name of the member to return
public JEnumConstant[] getConstants()
public void setSuperClass(java.lang.String superClass)
JClass
setSuperClass in class JClasssuperClass - the super Class that this Class extendspublic void print(JSourceWriter jsw)
print in class JClassjsw - the JSourceWriter to print to. [May not be null]public static void main(java.lang.String[] args)
args -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||