Class ImplJEnumConstant
java.lang.Object
org.jboss.jdeparser.BasicJCommentable
org.jboss.jdeparser.AbstractJDocCommentable
org.jboss.jdeparser.BasicJAnnotatable
org.jboss.jdeparser.ImplJEnumConstant
- All Implemented Interfaces:
JAnnotatable, JClassItem, JCommentable, JDocCommentable, JEnumConstant, JSimpleArgs
-
Nested Class Summary
Nested classes/interfaces inherited from interface JClassItem
JClassItem.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayList<AbstractJExpr> private EnumConstantJClassDefprivate final EnumJClassDefprivate final StringFields inherited from interface JClassItem
SMART_NAME_SORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd an argument.JExpr[]Get the arguments defined thus far.body()Add an implementation body to this enum constant.(package private) EnumJClassDefGet the kind of item.intGet the modifiers of this item.getName()Get the name of this element, if there is one.booleanhasAllModifiers(int mods) Determine whether this item has all of the modifiers specified by the given bitwise-OR-joined argument.booleanhasAnyModifier(int mods) Determine whether this item has any of the modifiers specified by the given bitwise-OR-joined argument.(package private) voidwriteDirect(SourceFileWriter writer) Methods inherited from class BasicJAnnotatable
annotate, annotate, annotate, writeAnnotationsMethods inherited from class AbstractJDocCommentable
deprecated, docComment, writeDocCommentsMethods inherited from class BasicJCommentable
blockComment, lineComment, writeCommentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JAnnotatable
annotate, annotate, annotateMethods inherited from interface JCommentable
blockComment, lineCommentMethods inherited from interface JDocCommentable
deprecated, docComment
-
Field Details
-
classDef
-
name
-
args
-
body
-
-
Constructor Details
-
ImplJEnumConstant
ImplJEnumConstant(EnumJClassDef classDef, String name)
-
-
Method Details
-
getClassDef
EnumJClassDef getClassDef() -
getName
Description copied from interface:JClassItemGet the name of this element, if there is one.- Specified by:
getNamein interfaceJClassItem- Returns:
- the name, or
nullif there is none
-
arg
Description copied from interface:JEnumConstantAdd an argument.- Specified by:
argin interfaceJEnumConstant- Specified by:
argin interfaceJSimpleArgs- Parameters:
expr- the argument expression- Returns:
- this program element
-
body
Description copied from interface:JEnumConstantAdd an implementation body to this enum constant.- Specified by:
bodyin interfaceJEnumConstant- Returns:
- the implementation class definition
-
arguments
Description copied from interface:JSimpleArgsGet the arguments defined thus far.- Specified by:
argumentsin interfaceJSimpleArgs- Returns:
- the arguments
-
writeDirect
- Throws:
IOException
-
getItemKind
Description copied from interface:JClassItemGet the kind of item.- Specified by:
getItemKindin interfaceJClassItem- Returns:
- the item kind
-
getModifiers
public int getModifiers()Description copied from interface:JClassItemGet the modifiers of this item.- Specified by:
getModifiersin interfaceJClassItem- Returns:
- the modifiers
- See Also:
-
hasAllModifiers
public boolean hasAllModifiers(int mods) Description copied from interface:JClassItemDetermine whether this item has all of the modifiers specified by the given bitwise-OR-joined argument.- Specified by:
hasAllModifiersin interfaceJClassItem- Parameters:
mods- the modifier(s)- Returns:
trueif all of the modifiers are present,falseotherwise
-
hasAnyModifier
public boolean hasAnyModifier(int mods) Description copied from interface:JClassItemDetermine whether this item has any of the modifiers specified by the given bitwise-OR-joined argument.- Specified by:
hasAnyModifierin interfaceJClassItem- Parameters:
mods- the modifier(s)- Returns:
trueif any if the modifiers are present,falseotherwise
-