Package com.sun.codemodel
Class JAnnotationUse
java.lang.Object
com.sun.codemodel.JAnnotationValue
com.sun.codemodel.JAnnotationUse
- All Implemented Interfaces:
- com.sun.codemodel.JGenerable
public final class JAnnotationUse
extends com.sun.codemodel.JAnnotationValue
Represents an annotation on a program element.
 
FIX to com.sun.codemodel.JAnnotationUse supporting JFieldRef as annotation values (constants)
- 
Method SummaryModifier and TypeMethodDescriptionannotate(Class<? extends Annotation> clazz) Deprecated.annotationParam(String name, Class<? extends Annotation> value) Adds a member value pair to this annotation For adding class values as paramvoidgenerate(com.sun.codemodel.JFormatter f) Adds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotation based on the type represented by the given JTypeAdds a member value pair to this annotationAdds a member value pair to this annotationAdds a member value pair to this annotationcom.sun.codemodel.JAnnotationArrayMemberparamArray(String name) Adds a member value pair which is of type array to this annotation
- 
Method Details- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The boolean value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The byte member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The char member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The double member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The float member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The long member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The short member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The int member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The String member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
annotationParamAdds a member value pair to this annotation For adding class values as param- Parameters:
- name- The simple name for this annotation
- value- The annotation class which is member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
- See Also:
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The enum class which is member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotation- Parameters:
- name- The simple name for this annotation
- value- The JEnumConstant which is member value for this annotation
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramAdds a member value pair to this annotationThis can be used for e.g to specify @XmlCollectionItem(type=Integer.class);For adding a value ofClass<? extends Annotation>- Parameters:
- name- The simple name for this annotation param
- value- The class type of the param
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
- See Also:
 
- 
paramAdds a member value pair to this annotation based on the type represented by the given JType- Parameters:
- name- The simple name for this annotation param
- type- the JType representing the actual type
- Returns:
- The JAnnotationUse. More member value pairs can be added to it using the same or the overloaded methods.
 
- 
paramArrayAdds a member value pair which is of type array to this annotation- Parameters:
- name- The simple name for this annotation
- Returns:
- The JAnnotationArrayMember. For adding array values
- See Also:
- 
- JAnnotationArrayMember
 
 
- 
annotateDeprecated.useJAnnotationArrayMember.annotate(java.lang.Class<? extends java.lang.annotation.Annotation>)This can be used to add annotations inside annotations for e.g @XmlCollection(values= @XmlCollectionItem(type=Foo.class))- Parameters:
- clazz- The annotation class to be included
- Returns:
- The JAnnotationUse that can be used as a member within this JAnnotationUse
 
- 
generatepublic void generate(com.sun.codemodel.JFormatter f) 
- 
param
 
- 
JAnnotationArrayMember.annotate(java.lang.Class<? extends java.lang.annotation.Annotation>)