Package org.hibernate.models.spi
Interface AnnotationUsage<A extends Annotation>
- All Known Subinterfaces:
MutableAnnotationUsage<A>
- All Known Implementing Classes:
DynamicAnnotationUsage,JandexAnnotationUsage,JdkAnnotationUsage
public interface AnnotationUsage<A extends Annotation>
Describes the usage of an annotation class on one of its
allowable targets.
The standard way to access values is using getAttributeValue(java.lang.String). Convenience
methods have been added for the allowable annotation types. These methods may throw
exceptions (generally ClassCastException, if the expected type does not match).
- API Note:
- Abstracts the underlying source of the annotation information, whether that is the annotation itself, JAXB, Jandex, HCANN, etc.
-
Method Summary
Modifier and TypeMethodDescription<V> VfindAttributeValue(String name) The value of the named annotation attributeDescriptor for the type of the used annotationThe target where this usage occursType of the used annotationdefault <V> VgetAttributeValue(String name) The value of the named annotation attributedefault <V> VgetAttributeValue(String name, Supplier<V> defaultValueSupplier) The value of the named annotation attributedefault <V> VgetAttributeValue(String name, V defaultValue) The value of the named annotation attributedefault <V> VgetAttributeValue(AttributeDescriptor<V> attributeDescriptor) default BooleangetBoolean(String name) default BooleangetBoolean(String name, boolean defaultValue) default BooleangetBoolean(String name, Supplier<Boolean> defaultValueSupplier) default Bytedefault Bytedefault Bytedefault ClassDetailsgetClassDetails(String name) default ClassDetailsgetClassDetails(String name, Supplier<ClassDetails> defaultValue) default ClassDetailsgetClassDetails(String name, ClassDetails defaultValue) default Doubledefault Doubledefault Doubledefault <E extends Enum<E>>
Edefault <E extends Enum<E>>
Edefault <E extends Enum<E>>
Edefault <E extends Enum<E>>
Edefault <E extends Enum<E>>
Edefault <E extends Enum<E>>
Edefault Floatdefault Floatdefault Floatdefault IntegergetInteger(String name) default IntegergetInteger(String name, Integer defaultValue) default IntegergetInteger(String name, Supplier<Integer> defaultValueSupplier) default <E> List<E>default <E> List<E>default <E> List<E>default Longdefault Longdefault Longdefault <X extends Annotation>
AnnotationUsage<X>getNestedUsage(String name) default <X extends Annotation>
AnnotationUsage<X>getNestedUsage(String name, Supplier<AnnotationUsage<X>> defaultValueSupplier) default <X extends Annotation>
AnnotationUsage<X>getNestedUsage(String name, AnnotationUsage<X> defaultValue) default Shortdefault Shortdefault Shortdefault Stringdefault Stringdefault StringCreate the Annotation representation of this usage
-
Method Details
-
getAnnotationDescriptor
AnnotationDescriptor<A> getAnnotationDescriptor()Descriptor for the type of the used annotation -
getAnnotationType
Type of the used annotation -
getAnnotationTarget
AnnotationTarget getAnnotationTarget()The target where this usage occurs -
toAnnotation
A toAnnotation()Create the Annotation representation of this usage -
findAttributeValue
The value of the named annotation attribute -
getAttributeValue
The value of the named annotation attribute -
getAttributeValue
The value of the named annotation attribute -
getAttributeValue
The value of the named annotation attribute -
getAttributeValue
-
getString
-
getString
-
getString
-
getBoolean
-
getBoolean
-
getBoolean
-
getByte
-
getByte
-
getByte
-
getShort
-
getShort
-
getShort
-
getInteger
-
getInteger
-
getInteger
-
getLong
-
getLong
-
getLong
-
getFloat
-
getFloat
-
getFloat
-
getDouble
-
getDouble
-
getDouble
-
getEnum
-
getEnum
-
getEnum
-
getEnum
-
getEnum
-
getEnum
-
getClassDetails
-
getClassDetails
-
getClassDetails
-
getNestedUsage
-
getNestedUsage
default <X extends Annotation> AnnotationUsage<X> getNestedUsage(String name, AnnotationUsage<X> defaultValue) -
getNestedUsage
default <X extends Annotation> AnnotationUsage<X> getNestedUsage(String name, Supplier<AnnotationUsage<X>> defaultValueSupplier) -
getList
-
getList
-
getList
-