|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.codemodel.JAnnotationValue
com.sun.codemodel.JAnnotationUse
public final class JAnnotationUse
Represents an annotation on a program element. TODO How to add enums to the annotations
Method Summary | |
---|---|
JAnnotationUse |
annotate(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
Deprecated. use JAnnotationArrayMember.annotate(java.lang.Class extends java.lang.annotation.Annotation>) |
JAnnotationUse |
annotationParam(java.lang.String name,
java.lang.Class<? extends java.lang.annotation.Annotation> value)
Adds a member value pair to this annotation For adding class values as param |
void |
generate(JFormatter f)
|
JAnnotationUse |
param(java.lang.String name,
boolean value)
Adds a member value pair to this annotation |
JAnnotationUse |
param(java.lang.String name,
java.lang.Class value)
Adds a member value pair to this annotation This can be used for e.g to specify |
JAnnotationUse |
param(java.lang.String name,
java.lang.Enum value)
Adds a member value pair to this annotation |
JAnnotationUse |
param(java.lang.String name,
int value)
Adds a member value pair to this annotation |
JAnnotationUse |
param(java.lang.String name,
JEnumConstant value)
Adds a member value pair to this annotation |
JAnnotationUse |
param(java.lang.String name,
JType type)
Adds a member value pair to this annotation based on the type represented by the given JType |
JAnnotationUse |
param(java.lang.String name,
java.lang.String value)
Adds a member value pair to this annotation |
JAnnotationArrayMember |
paramArray(java.lang.String name)
Adds a member value pair which is of type array to this annotation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public JAnnotationUse param(java.lang.String name, boolean value)
name
- The simple name for this annotationvalue
- The boolean value for this annotation
public JAnnotationUse param(java.lang.String name, int value)
name
- The simple name for this annotationvalue
- The int member value for this annotation
public JAnnotationUse param(java.lang.String name, java.lang.String value)
name
- The simple name for this annotationvalue
- The String member value for this annotation
public JAnnotationUse annotationParam(java.lang.String name, java.lang.Class<? extends java.lang.annotation.Annotation> value)
name
- The simple name for this annotationvalue
- The annotation class which is member value for this annotation
param(String, Class)
public JAnnotationUse param(java.lang.String name, java.lang.Enum value)
name
- The simple name for this annotationvalue
- The enum class which is member value for this annotation
public JAnnotationUse param(java.lang.String name, JEnumConstant value)
name
- The simple name for this annotationvalue
- The JEnumConstant which is member value for this annotation
public JAnnotationUse param(java.lang.String name, java.lang.Class value)
@XmlCollectionItem(type=Integer.class);For adding a value of Class extends Annotation>
name
- The simple name for this annotation paramvalue
- The class type of the param
public JAnnotationUse param(java.lang.String name, JType type)
name
- The simple name for this annotation paramtype
- the JType representing the actual type
public JAnnotationArrayMember paramArray(java.lang.String name)
name
- The simple name for this annotation
JAnnotationArrayMember
public JAnnotationUse annotate(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
JAnnotationArrayMember.annotate(java.lang.Class extends java.lang.annotation.Annotation>)
clazz
- The annotation class to be included
public void generate(JFormatter f)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |