@HashCodeAndEqualsPlugin.Enhance public static class AnnotationDescription.Builder extends Object
AnnotationDescription
.Modifier | Constructor and Description |
---|---|
protected |
Builder(TypeDescription annotationType,
Map<String,AnnotationValue<?,?>> annotationValues)
Creates a builder for an annotation description.
|
Modifier and Type | Method and Description |
---|---|
AnnotationDescription |
build()
Creates an annotation description for the values that were defined for this builder.
|
AnnotationDescription |
build(boolean validated)
Creates an annotation description for the values that were defined for this builder.
|
AnnotationDescription.Builder |
define(String property,
Annotation annotation)
Returns a builder with the additional annotation property.
|
AnnotationDescription.Builder |
define(String property,
AnnotationDescription annotationDescription)
Returns a builder with the additional annotation property.
|
AnnotationDescription.Builder |
define(String property,
AnnotationValue<?,?> value)
Returns a builder with the additional, given property.
|
AnnotationDescription.Builder |
define(String property,
boolean value)
Returns a builder with the additional
boolean property. |
AnnotationDescription.Builder |
define(String property,
byte value)
Returns a builder with the additional
byte property. |
AnnotationDescription.Builder |
define(String property,
char value)
Returns a builder with the additional
char property. |
AnnotationDescription.Builder |
define(String property,
Class<?> type)
Returns a builder with the additional class property.
|
AnnotationDescription.Builder |
define(String property,
double value)
Returns a builder with the additional
double property. |
AnnotationDescription.Builder |
define(String property,
Enum<?> value)
Returns a builder with the additional enumeration property.
|
AnnotationDescription.Builder |
define(String property,
EnumerationDescription value)
Returns a builder with the additional enumeration property.
|
AnnotationDescription.Builder |
define(String property,
float value)
Returns a builder with the additional
float property. |
AnnotationDescription.Builder |
define(String property,
int value)
Returns a builder with the additional
int property. |
AnnotationDescription.Builder |
define(String property,
long value)
Returns a builder with the additional
long property. |
AnnotationDescription.Builder |
define(String property,
short value)
Returns a builder with the additional
short property. |
AnnotationDescription.Builder |
define(String property,
String value)
Returns a builder with the additional
String property. |
AnnotationDescription.Builder |
define(String property,
TypeDescription typeDescription)
Returns a builder with the additional class property.
|
AnnotationDescription.Builder |
define(String property,
TypeDescription enumerationType,
String value)
Returns a builder with the additional enumeration property.
|
<T extends Annotation> |
defineAnnotationArray(String property,
Class<T> annotationType,
T... annotation)
Returns a builder with the additional annotation array property.
|
AnnotationDescription.Builder |
defineAnnotationArray(String property,
TypeDescription annotationType,
AnnotationDescription... annotationDescription)
Returns a builder with the additional annotation array property.
|
AnnotationDescription.Builder |
defineArray(String property,
boolean... value)
Returns a builder with the additional
boolean array property. |
AnnotationDescription.Builder |
defineArray(String property,
byte... value)
Returns a builder with the additional
byte array property. |
AnnotationDescription.Builder |
defineArray(String property,
char... value)
Returns a builder with the additional
char array property. |
AnnotationDescription.Builder |
defineArray(String property,
double... value)
Returns a builder with the additional
double array property. |
AnnotationDescription.Builder |
defineArray(String property,
float... value)
Returns a builder with the additional
float array property. |
AnnotationDescription.Builder |
defineArray(String property,
int... value)
Returns a builder with the additional
int array property. |
AnnotationDescription.Builder |
defineArray(String property,
long... value)
Returns a builder with the additional
long array property. |
AnnotationDescription.Builder |
defineArray(String property,
short... value)
Returns a builder with the additional
short array property. |
AnnotationDescription.Builder |
defineArray(String property,
String... value)
Returns a builder with the additional
String array property. |
<T extends Enum<?>> |
defineEnumerationArray(String property,
Class<T> enumerationType,
T... value)
Returns a builder with the additional enumeration array property.
|
AnnotationDescription.Builder |
defineEnumerationArray(String property,
TypeDescription enumerationType,
EnumerationDescription... value)
Returns a builder with the additional enumeration array property.
|
AnnotationDescription.Builder |
defineEnumerationArray(String property,
TypeDescription enumerationType,
String... value)
Returns a builder with the additional enumeration array property.
|
AnnotationDescription.Builder |
defineTypeArray(String property,
Class<?>... type)
Returns a builder with the additional type array property.
|
AnnotationDescription.Builder |
defineTypeArray(String property,
TypeDescription... typeDescription)
Returns a builder with the additional type array property.
|
static AnnotationDescription.Builder |
ofType(Class<? extends Annotation> annotationType)
Creates a builder for creating an annotation of the given type.
|
static AnnotationDescription.Builder |
ofType(TypeDescription annotationType)
Creates a builder for creating an annotation of the given type.
|
protected Builder(TypeDescription annotationType, Map<String,AnnotationValue<?,?>> annotationValues)
annotationType
- The annotation type.annotationValues
- A mapping of annotation properties to their annotation values.public static AnnotationDescription.Builder ofType(Class<? extends Annotation> annotationType)
annotationType
- The annotation type.public static AnnotationDescription.Builder ofType(TypeDescription annotationType)
annotationType
- A description of the annotation type.public AnnotationDescription.Builder define(String property, AnnotationValue<?,?> value)
property
- The name of the property to define.value
- An explicit description of the annotation value.public AnnotationDescription.Builder define(String property, Enum<?> value)
property
- The name of the property to define.value
- The enumeration value to define.public AnnotationDescription.Builder define(String property, TypeDescription enumerationType, String value)
property
- The name of the property to define.enumerationType
- The type of the enumeration.value
- The enumeration value to define.public AnnotationDescription.Builder define(String property, EnumerationDescription value)
property
- The name of the property to define.value
- A description of the enumeration value to define.public AnnotationDescription.Builder define(String property, Annotation annotation)
property
- The name of the property to define.annotation
- The annotation value to define.public AnnotationDescription.Builder define(String property, AnnotationDescription annotationDescription)
property
- The name of the property to define.annotationDescription
- A description of the annotation value to define.public AnnotationDescription.Builder define(String property, Class<?> type)
property
- The name of the property to define.type
- The class value to define.public AnnotationDescription.Builder define(String property, TypeDescription typeDescription)
property
- The name of the property to define.typeDescription
- A description of the type to define as a property value.public <T extends Enum<?>> AnnotationDescription.Builder defineEnumerationArray(String property, Class<T> enumerationType, T... value)
T
- The enumeration type.property
- The name of the property to define.enumerationType
- The type of the enumeration, i.e. the component type of the enumeration array.value
- The enumeration values to be contained by the array.public AnnotationDescription.Builder defineEnumerationArray(String property, TypeDescription enumerationType, String... value)
property
- The name of the property to define.enumerationType
- The type of the enumerations, i.e. is the component type of the enumeration array.value
- The enumeration values to be contained by the array.public AnnotationDescription.Builder defineEnumerationArray(String property, TypeDescription enumerationType, EnumerationDescription... value)
property
- The name of the property to define.enumerationType
- The type of the enumerations, i.e. the component type of the enumeration array.value
- Descriptions of the enumerations to be contained by the array.public <T extends Annotation> AnnotationDescription.Builder defineAnnotationArray(String property, Class<T> annotationType, T... annotation)
T
- The annotation type.property
- The name of the property to define.annotationType
- The type of the annotations, i.e. the component type of the enumeration array.annotation
- The annotation values to be contained by the array.public AnnotationDescription.Builder defineAnnotationArray(String property, TypeDescription annotationType, AnnotationDescription... annotationDescription)
property
- The name of the property to define.annotationType
- The type of the annotations, i.e. the component type of the enumeration array.annotationDescription
- Descriptions of the annotation values to be contained by the array.public AnnotationDescription.Builder defineTypeArray(String property, Class<?>... type)
property
- The name of the property to define.type
- The types that should be contained by the array.public AnnotationDescription.Builder defineTypeArray(String property, TypeDescription... typeDescription)
property
- The name of the property to define.typeDescription
- Descriptions of the types that should be contained by the array.public AnnotationDescription.Builder define(String property, boolean value)
boolean
property.property
- The name of the property to define.value
- The boolean
value to define for the property.boolean
property.public AnnotationDescription.Builder define(String property, byte value)
byte
property.property
- The name of the property to define.value
- The byte
value to define for the property.byte
property.public AnnotationDescription.Builder define(String property, char value)
char
property.property
- The name of the property to define.value
- The char
value to define for the property.char
property.public AnnotationDescription.Builder define(String property, short value)
short
property.property
- The name of the property to define.value
- The short
value to define for the property.short
property.public AnnotationDescription.Builder define(String property, int value)
int
property.property
- The name of the property to define.value
- The int
value to define for the property.int
property.public AnnotationDescription.Builder define(String property, long value)
long
property.property
- The name of the property to define.value
- The long
value to define for the property.long
property.public AnnotationDescription.Builder define(String property, float value)
float
property.property
- The name of the property to define.value
- The float
value to define for the property.float
property.public AnnotationDescription.Builder define(String property, double value)
double
property.property
- The name of the property to define.value
- The double
value to define for the property.double
property.public AnnotationDescription.Builder define(String property, String value)
String
property.public AnnotationDescription.Builder defineArray(String property, boolean... value)
boolean
array property.property
- The name of the property to define.value
- The boolean
values to define for the property.boolean
array property.public AnnotationDescription.Builder defineArray(String property, byte... value)
byte
array property.property
- The name of the property to define.value
- The byte
values to define for the property.byte
array property.public AnnotationDescription.Builder defineArray(String property, char... value)
char
array property.property
- The name of the property to define.value
- The char
values to define for the property.char
array property.public AnnotationDescription.Builder defineArray(String property, short... value)
short
array property.property
- The name of the property to define.value
- The short
values to define for the property.short
array property.public AnnotationDescription.Builder defineArray(String property, int... value)
int
array property.property
- The name of the property to define.value
- The int
values to define for the property.int
array property.public AnnotationDescription.Builder defineArray(String property, long... value)
long
array property.property
- The name of the property to define.value
- The long
values to define for the property.long
array property.public AnnotationDescription.Builder defineArray(String property, float... value)
float
array property.property
- The name of the property to define.value
- The float
values to define for the property.float
array property.public AnnotationDescription.Builder defineArray(String property, double... value)
double
array property.property
- The name of the property to define.value
- The double
values to define for the property.double
array property.public AnnotationDescription.Builder defineArray(String property, String... value)
String
array property.public AnnotationDescription build()
public AnnotationDescription build(boolean validated)
validated
- true
if the annotation description should be validated for having included all values.Copyright © 2014–2025. All rights reserved.