org.exolab.javasource
Class JEnum
- JAnnotatedElement
Describes the definition of a enum type class.
$Revision: 7331 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
JEnum(String name) - Construct JEnum with given name.
|
addConstructor , addField , addMethod , addMethod , addMethods , createConstructor , createConstructor , createInnerClass , getConstructor , getConstructors , getContructorsCount , getField , getFieldCount , getFields , getInnerClassCount , getInnerClasses , getMethod , getMethod , getMethodCount , getMethods , getStaticInitializationCode , print , print , printClassHeaders , printConstructors , printInnerClasses , printMemberVariables , printMethods , printStaticInitializers , removeConstructor , removeField , removeField , removeInnerClass , removeMethod |
addAnnotation , addField , addImport , addImport , addImport , addImportInternal , addInterface , addMember , getAnnotatedElementHelper , getAnnotation , getAnnotations , getField , getFields , getFilename , getHeader , getImportCount , getImports , getInterfaceCount , getInterfaces , getJDocComment , getModifiers , getPackageName , hasAnnotations , hasImport , isAnnotationPresent , print , print , printHeader , printImportDeclarations , printPackageDeclaration , removeAnnotation , removeImport , setHeader , toString |
JEnum
public JEnum(String name)
Construct JEnum with given 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.
addConstructor
public void addConstructor(JConstructor constructor)
Override to only allow private constructors.
- addConstructor in interface AbstractJClass
constructor
- The constructor that should be added.
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.
getConstantCount
public int getConstantCount()
Returns the amount of enum constants.
- The amount of enum constants.
getConstants
public JEnumConstant[] getConstants()
Returns an array of all the JEnumConstant of this JEnum.
- An array of all the JEnumConstant of this JEnum.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com