Interface AnnotationProperty
public interface AnnotationProperty
A property of an annotation.
A property has a value. It may also contain a reference to a constant that defines its value, for example
when generating the annotation into source code.
Support types are defined on Annotation.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA reference to a constant, that can be used in generated annotation code. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Enum<T>>
AnnotationPropertyCreate a new enum property.static AnnotationPropertyCreate a new annotation property.static AnnotationPropertyCreate a new annotation property with a constant value.value()Value of the property, nevernull.
-
Method Details
-
create
Create a new annotation property.- Parameters:
value- value of the property, must be one of the supported types, seeAnnotation; must not be an instance of this class- Returns:
- a new annotation property
- See Also:
-
create
Create a new annotation property with a constant value. Constant value can be used when generating code.- Parameters:
value- value of the property, must be one of the supported types, seeAnnotation; must not be an instance of this classconstantType- type of the class that holds the referenced constantconstantName- name of the constant (i.e. an accessible static final field)- Returns:
- a new annotation property
- See Also:
-
create
Create a new enum property.- Type Parameters:
T- type of the enum- Parameters:
type- enum typevalue- enum value constant- Returns:
- new enum value
-
value
-