Package com.sun.codemodel
Class JAnnotationArrayMember
java.lang.Object
com.sun.codemodel.JAnnotationValue
com.sun.codemodel.JAnnotationArrayMember
- All Implemented Interfaces:
JAnnotatable,JGenerable
Represents an arrays as annotation members
This class implements JAnnotatable to allow
new annotations to be added as a member of the array.
- Author:
- Bhakti Mehta (bhakti.mehta@sun.com)
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new annotation to the array.annotate(Class<? extends Annotation> clazz) Adds a new annotation to the array.<W extends JAnnotationWriter<? extends Annotation>>
WAdds an annotation to this program element and returns a type-safe writer to fill in the values of such annotations.voidparam(boolean value) Adds an array member to this annotationparam(byte value) Adds an array member to this annotationparam(char value) Adds an array member to this annotationparam(double value) Adds an array member to this annotationparam(float value) Adds an array member to this annotationparam(int value) Adds an array member to this annotationparam(long value) Adds an array member to this annotationparam(short value) Adds an array member to this annotationparam(JAnnotationUse value) Deprecated.param(JEnumConstant value) Adds a enum array member to this annotationparam(JExpression value) Adds an expression array member to this annotationAdds a class array member to this annotationAdds a enum array member to this annotationAdds an array member to this annotationbooleanremoveAnnotation(JAnnotationUse annotation) Removes annotation from this program element.
-
Method Details
-
param
Adds an array member to this annotation- Parameters:
value- Adds a string value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds a boolean value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds a byte value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds a char value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds a double value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds a long value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds a short value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds an int value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an array member to this annotation- Parameters:
value- Adds a float value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds a enum array member to this annotation- Parameters:
value- Adds a enum value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds a enum array member to this annotation- Parameters:
value- Adds a enum value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds an expression array member to this annotation- Parameters:
value- Adds an expression value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
Adds a class array member to this annotation- Parameters:
value- Adds a class value to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
param
-
annotate
Adds a new annotation to the array.- Specified by:
annotatein interfaceJAnnotatable- Parameters:
clazz- The annotation class to annotate the program element with
-
annotate
Adds a new annotation to the array.- Specified by:
annotatein interfaceJAnnotatable- Parameters:
clazz- The annotation class to annotate the program element with
-
removeAnnotation
Description copied from interface:JAnnotatableRemoves annotation from this program element.- Specified by:
removeAnnotationin interfaceJAnnotatable- Parameters:
annotation- The annotation to be removed from the program element
-
annotate2
Description copied from interface:JAnnotatableAdds an annotation to this program element and returns a type-safe writer to fill in the values of such annotations.- Specified by:
annotate2in interfaceJAnnotatable- Returns:
-
annotations
- Specified by:
annotationsin interfaceJAnnotatable- Returns:
- Can be empty but never null.
-
param
Adds an annotation member to this annotation array This can be used for e.g @XmlCollection(values= @XmlCollectionItem(type=Foo.class))- Parameters:
value- Adds a annotation to the array member- Returns:
- The JAnnotationArrayMember. More elements can be added by calling the same method multiple times
-
generate
- Specified by:
generatein interfaceJGenerable
-
annotate(java.lang.Class<? extends java.lang.annotation.Annotation>)