class ImplJEnumConstant extends BasicJAnnotatable implements JEnumConstant, JClassItem
JClassItem.Kind| Modifier and Type | Field and Description |
|---|---|
private java.util.ArrayList<AbstractJExpr> |
args |
private EnumConstantJClassDef |
body |
private EnumJClassDef |
classDef |
private java.lang.String |
name |
SMART_NAME_SORT| Constructor and Description |
|---|
ImplJEnumConstant(EnumJClassDef classDef,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
JEnumConstant |
arg(JExpr expr)
Add an argument.
|
JExpr[] |
arguments()
Get the arguments defined thus far.
|
JClassDef |
body()
Add an implementation body to this enum constant.
|
(package private) EnumJClassDef |
getClassDef() |
JClassItem.Kind |
getItemKind()
Get the kind of item.
|
int |
getModifiers()
Get the modifiers of this item.
|
java.lang.String |
getName()
Get the name of this element, if there is one.
|
boolean |
hasAllModifiers(int mods)
Determine whether this item has all of the modifiers specified by the given bitwise-OR-joined argument.
|
boolean |
hasAnyModifier(int mods)
Determine whether this item has any of the modifiers specified by the given bitwise-OR-joined argument.
|
(package private) void |
writeDirect(SourceFileWriter writer) |
annotate, annotate, annotate, writeAnnotationsdeprecated, docComment, writeDocCommentsblockComment, lineComment, writeCommentsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitannotate, annotate, annotatedeprecated, docCommentblockComment, lineCommentprivate final EnumJClassDef classDef
private final java.lang.String name
private java.util.ArrayList<AbstractJExpr> args
private EnumConstantJClassDef body
ImplJEnumConstant(EnumJClassDef classDef, java.lang.String name)
EnumJClassDef getClassDef()
public java.lang.String getName()
JClassItemgetName in interface JClassItemnull if there is nonepublic JEnumConstant arg(JExpr expr)
JEnumConstantarg in interface JEnumConstantarg in interface JSimpleArgsexpr - the argument expressionpublic JClassDef body()
JEnumConstantbody in interface JEnumConstantpublic JExpr[] arguments()
JSimpleArgsarguments in interface JSimpleArgsvoid writeDirect(SourceFileWriter writer) throws java.io.IOException
java.io.IOExceptionpublic JClassItem.Kind getItemKind()
JClassItemgetItemKind in interface JClassItempublic int getModifiers()
JClassItemgetModifiers in interface JClassItemJModpublic boolean hasAllModifiers(int mods)
JClassItemhasAllModifiers in interface JClassItemmods - the modifier(s)true if all of the modifiers are present, false otherwisepublic boolean hasAnyModifier(int mods)
JClassItemhasAnyModifier in interface JClassItemmods - the modifier(s)true if any if the modifiers are present, false otherwise