public final class JAnnotationArrayMember extends JAnnotationValue implements JAnnotatable
This class implements JAnnotatable
to allow
new annotations to be added as a member of the array.
Modifier and Type | Method and Description |
---|---|
JAnnotationUse |
annotate(Class<? extends Annotation> clazz)
Adds a new annotation to the array.
|
JAnnotationUse |
annotate(JClass clazz)
Adds a new annotation to the array.
|
<W extends JAnnotationWriter> |
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()
|
void |
generate(JFormatter f) |
JAnnotationArrayMember |
param(boolean value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(byte value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(char value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(Class<?> value)
Adds a class array member to this annotation
|
JAnnotationArrayMember |
param(double value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(Enum<?> value)
Adds a enum array member to this annotation
|
JAnnotationArrayMember |
param(float value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(int value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(JAnnotationUse value)
|
JAnnotationArrayMember |
param(JEnumConstant value)
Adds a enum array member to this annotation
|
JAnnotationArrayMember |
param(JExpression value)
Adds an expression array member to this annotation
|
JAnnotationArrayMember |
param(JType type) |
JAnnotationArrayMember |
param(long value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(short value)
Adds an array member to this annotation
|
JAnnotationArrayMember |
param(String value)
Adds an array member to this annotation
|
boolean |
removeAnnotation(JAnnotationUse annotation)
Removes annotation from this program element.
|
public JAnnotationArrayMember param(String value)
value
- Adds a string value to the array memberpublic JAnnotationArrayMember param(boolean value)
value
- Adds a boolean value to the array memberpublic JAnnotationArrayMember param(byte value)
value
- Adds a byte value to the array memberpublic JAnnotationArrayMember param(char value)
value
- Adds a char value to the array memberpublic JAnnotationArrayMember param(double value)
value
- Adds a double value to the array memberpublic JAnnotationArrayMember param(long value)
value
- Adds a long value to the array memberpublic JAnnotationArrayMember param(short value)
value
- Adds a short value to the array memberpublic JAnnotationArrayMember param(int value)
value
- Adds an int value to the array memberpublic JAnnotationArrayMember param(float value)
value
- Adds a float value to the array memberpublic JAnnotationArrayMember param(Enum<?> value)
value
- Adds a enum value to the array memberpublic JAnnotationArrayMember param(JEnumConstant value)
value
- Adds a enum value to the array memberpublic JAnnotationArrayMember param(JExpression value)
value
- Adds an expression value to the array memberpublic JAnnotationArrayMember param(Class<?> value)
value
- Adds a class value to the array memberpublic JAnnotationArrayMember param(JType type)
public JAnnotationUse annotate(Class<? extends Annotation> clazz)
annotate
in interface JAnnotatable
clazz
- The annotation class to annotate the program element withpublic JAnnotationUse annotate(JClass clazz)
annotate
in interface JAnnotatable
clazz
- The annotation class to annotate the program element withpublic boolean removeAnnotation(JAnnotationUse annotation)
JAnnotatable
removeAnnotation
in interface JAnnotatable
annotation
- The annotation to be removed from the program elementpublic <W extends JAnnotationWriter> W annotate2(Class<W> clazz)
JAnnotatable
annotate2
in interface JAnnotatable
public Collection<JAnnotationUse> annotations()
annotations
in interface JAnnotatable
public JAnnotationArrayMember param(JAnnotationUse value)
value
- Adds a annotation to the array memberpublic void generate(JFormatter f)
generate
in interface JGenerable
Copyright © 2017 JBoss by Red Hat. All rights reserved.