public class JEnumConstant extends AbstractJExpressionImpl implements IJDeclaration, IJAnnotatable, IJDocCommentable
IJExpression, this object represents a
reference to the enum constant.| Modifier | Constructor and Description |
|---|---|
protected |
JEnumConstant(AbstractJClass aType,
String sName) |
| Modifier and Type | Method and Description |
|---|---|
JAnnotationUse |
annotate(AbstractJClass clazz)
Adds an annotation to this variable.
|
JAnnotationUse |
annotate(Class<? extends Annotation> clazz)
Adds an annotation to this variable.
|
<W extends IJAnnotationWriter<?>> |
annotate2(Class<W> clazz)
Adds an annotation to this program element and returns a type-safe writer
to fill in the values of such annotations.
|
Collection<JAnnotationUse> |
annotations()
|
JEnumConstant |
arg(IJExpression aArg)
Add an expression to this constructor's argument list
|
List<IJExpression> |
args() |
void |
declare(JFormatter f) |
boolean |
equals(Object o) |
void |
generate(JFormatter f) |
String |
getName()
Returns the name of this constant including the type name
|
boolean |
hasArgs() |
int |
hashCode() |
JDocComment |
javadoc()
Creates, if necessary, and returns the enum constant javadoc.
|
String |
name() |
AbstractJClass |
type() |
_instanceof, band, bor, cand, complement, component, component, component0, cor, decr, div, div, div, div, div, eq, eq0, eqNull, gt, gt0, gte, gte0, incr, invoke, invoke, lt, lt0, lte, lte0, minus, minus, minus, minus, minus, minus, mod, mul, mul, mul, mul, mul, ne, ne0, neNull, not, plus, plus, plus, plus, plus, plus, predecr, preincr, ref, ref, shl, shl, shr, shr, shrz, shrz, xorprotected JEnumConstant(@Nonnull AbstractJClass aType, @Nonnull String sName)
@Nonnull public AbstractJClass type()
@Nonnull public String name()
@Nonnull public JEnumConstant arg(@Nonnull IJExpression aArg)
aArg - Argument to add to argument list@Nonnull public List<IJExpression> args()
public boolean hasArgs()
@Nonnull public String getName()
@Nonnull public JDocComment javadoc()
javadoc in interface IJDocCommentable@Nonnull public JAnnotationUse annotate(@Nonnull AbstractJClass clazz)
annotate in interface IJAnnotatableclazz - The annotation class to annotate the field withJAnnotationUse@Nonnull public JAnnotationUse annotate(@Nonnull Class<? extends Annotation> clazz)
annotate in interface IJAnnotatableclazz - The annotation class to annotate the field withJAnnotationUse@Nonnull public <W extends IJAnnotationWriter<?>> W annotate2(@Nonnull Class<W> clazz)
IJAnnotatableannotate2 in interface IJAnnotatableW - Implementation typeclazz - Source class@Nonnull public Collection<JAnnotationUse> annotations()
annotations in interface IJAnnotatablenull.public void declare(@Nonnull JFormatter f)
declare in interface IJDeclarationpublic void generate(@Nonnull JFormatter f)
generate in interface IJGenerableCopyright © 2013–2015 Philip Helger. All rights reserved.