|
Codemodel 2.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.codemodel.JExpressionImpl
com.sun.codemodel.JEnumConstant
public final class JEnumConstant
Enum Constant.
When used as an JExpression
, this object represents a reference to the enum constant.
Method Summary | ||
---|---|---|
JAnnotationUse |
annotate(Class<? extends Annotation> clazz)
Adds an annotation to this variable. |
|
JAnnotationUse |
annotate(JClass clazz)
Adds an annotation to this variable. |
|
|
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()
JAnnotatable.annotations() |
|
JEnumConstant |
arg(JExpression arg)
Add an expression to this constructor's argument list |
|
void |
declare(JFormatter f)
|
|
void |
generate(JFormatter f)
|
|
String |
getName()
Returns the name of this constant. |
|
JDocComment |
javadoc()
Creates, if necessary, and returns the enum constant javadoc. |
Methods inherited from class com.sun.codemodel.JExpressionImpl |
---|
_instanceof, band, bor, cand, complement, component, cor, decr, div, eq, gt, gte, incr, invoke, invoke, lt, lte, minus, minus, mod, mul, ne, not, plus, ref, ref, shl, shr, shrz, xor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public JEnumConstant arg(JExpression arg)
arg
- Argument to add to argument listpublic String getName()
public JDocComment javadoc()
javadoc
in interface JDocCommentable
public JAnnotationUse annotate(JClass clazz)
annotate
in interface JAnnotatable
clazz
- The annotation class to annotate the field withpublic JAnnotationUse annotate(Class<? extends Annotation> clazz)
annotate
in interface JAnnotatable
clazz
- The annotation class to annotate the field withpublic <W extends JAnnotationWriter> W annotate2(Class<W> clazz)
JAnnotatable
annotate2
in interface JAnnotatable
public Collection<JAnnotationUse> annotations()
JAnnotatable.annotations()
annotations
in interface JAnnotatable
public void declare(JFormatter f)
declare
in interface JDeclaration
public void generate(JFormatter f)
generate
in interface JGenerable
|
Codemodel 2.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |