org.exolab.javasource
Class JEnum
- JAnnotatedElement
Describes the definition of a enum type class.
addConstructor , addField , addImport , addMember , addMethod , addMethod , addMethods , createConstructor , createConstructor , createInnerClass , getConstructor , getConstructors , getField , getFields , getInnerClasses , getMethod , getMethod , getMethods , getStaticInitializationCode , getSuperClass , getSuperClassQualifiedName , main , print , print , removeConstructor , removeField , removeField , removeInnerClass , removeMethod , setSuperClass |
addAnnotation , addField , addImport , addImport , addImport , addInterface , addInterface , addMember , getAnnotatedElementHelper , getAnnotation , getAnnotations , getField , getFields , getFilename , getHeader , getImports , getInterfaceCount , getInterfaces , getJDocComment , getModifiers , getName , getPackageFromClassName , getPackageName , hasAnnotations , hasImport , isAnnotationPresent , isValidClassName , print , print , print , printHeader , printImportDeclarations , printPackageDeclaration , printlnWithPrefix , removeAnnotation , removeImport , setHeader , setPackageName |
JEnum
protected JEnum(String name)
name
- the name for this JEnum
addConstant
public void addConstant(JEnumConstant jConstant)
Adds the given JEnumConstant to this JEnum.
jConstant
- the constant to add
addMember
public void addMember(JMember jMember)
Adds the given JMember to this JEnum.
- addMember in interface JClass
jMember
- the JMember to add
getConstant
public JEnumConstant getConstant(String name)
Returns the member with the given name, or null if no member was found
with the given name.
name
- the name of the member to return
- the member with the given name, or null if no member was found
with the given name.
getConstants
public JEnumConstant[] getConstants()
Returns an array of all the JEnumConstant of this JEnum.
- an array of all the JEnumConstant of this JEnum.
main
public static void main(String[] args)
Test drive.
- main in interface JClass
args
- command-line arguments.
print
public void print(JSourceWriter jsw)
Prints the source code for this JEnum to the given JSourceWriter.
- print in interface JClass
jsw
- the JSourceWriter to print to. Must not be null.
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com