public interface AnnotationMetadata extends AnnotationSource
An interface implemented at compile time by Micronaut that allows the inspection of annotation metadata and stereotypes (meta-annotations)
.This interface exposes fast and efficient means to expose annotation data at runtime without requiring reflective tricks to read the annotation metadata
Users of Micronaut should in general avoid the methods of the AnnotatedElement
interface and use this interface instead to obtain maximum efficiency
Core framework types such as io.micronaut.inject.BeanDefinition
and
io.micronaut.inject.ExecutableMethod
implement this interface
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_NAME_SUFFIX
The suffix used when saving compiled metadata to classes.
|
static AnnotationMetadata |
EMPTY_METADATA
A constant for representing empty metadata.
|
static String |
VALUE_MEMBER
The default
value() member. |
EMPTY
Modifier and Type | Method and Description |
---|---|
default Optional<Boolean> |
booleanValue(Class<? extends Annotation> annotation)
The value as an optional boolean for the given annotation and member.
|
default Optional<Boolean> |
booleanValue(Class<? extends Annotation> annotation,
String member)
The value as an optional boolean for the given annotation and member.
|
default Optional<Boolean> |
booleanValue(String annotation)
The value as an optional boolean for the given annotation and member.
|
default Optional<Boolean> |
booleanValue(String annotation,
String member)
The value as an optional boolean for the given annotation and member.
|
default Optional<Class> |
classValue(Class<? extends Annotation> annotation)
The value of the annotation as a Class.
|
default Optional<Class> |
classValue(Class<? extends Annotation> annotation,
String member)
The value of the annotation as a Class.
|
default Optional<Class> |
classValue(String annotation)
The value of the annotation as a Class.
|
default Optional<Class> |
classValue(String annotation,
String member)
The value of the annotation as a Class.
|
default <T> Class<T>[] |
classValues(Class<? extends Annotation> annotation)
The value of the annotation as a Class.
|
default <T> Class<T>[] |
classValues(Class<? extends Annotation> annotation,
String member)
The value of the annotation as a Class.
|
default <T> Class<T>[] |
classValues(String annotation)
The value of the annotation as a Class.
|
default <T> Class<T>[] |
classValues(String annotation,
String member)
The value of the annotation as a Class.
|
default OptionalDouble |
doubleValue(Class<? extends Annotation> annotation)
The value as an
OptionalDouble for the given annotation and member. |
default OptionalDouble |
doubleValue(Class<? extends Annotation> annotation,
String member)
The value as an
OptionalDouble for the given annotation and member. |
default OptionalDouble |
doubleValue(String annotation,
String member)
The value as an
OptionalDouble for the given annotation and member. |
default <E extends Enum> |
enumValue(Class<? extends Annotation> annotation,
Class<E> enumType)
The value of the annotation as a Class.
|
default <E extends Enum> |
enumValue(Class<? extends Annotation> annotation,
String member,
Class<E> enumType)
The value of the annotation as a Class.
|
default <E extends Enum> |
enumValue(String annotation,
Class<E> enumType)
The value of the given enum.
|
default <E extends Enum> |
enumValue(String annotation,
String member,
Class<E> enumType)
The value of the annotation as a Class.
|
default <E extends Enum> |
enumValues(Class<? extends Annotation> annotation,
Class<E> enumType)
The enum values for the given annotation.
|
default <E extends Enum> |
enumValues(Class<? extends Annotation> annotation,
String member,
Class<E> enumType)
The enum values for the given annotation.
|
default <E extends Enum> |
enumValues(String annotation,
Class<E> enumType)
The enum values for the given annotation.
|
default <E extends Enum> |
enumValues(String annotation,
String member,
Class<E> enumType)
The enum values for the given annotation.
|
default <T extends Annotation> |
findAnnotation(Class<T> annotationClass)
Get all of the values for the given annotation.
|
default <T extends Annotation> |
findDeclaredAnnotation(Class<T> annotationClass)
Get all of the values for the given annotation that are directly declared on the annotated element.
|
default Optional<String> |
findRepeatableAnnotation(Class<? extends Annotation> annotation)
Find repeatable annotation container.
|
default Optional<String> |
findRepeatableAnnotation(String annotation)
Find repeatable annotation container.
|
default Optional<String> |
getAnnotationNameByStereotype(Class<? extends Annotation> stereotype)
Find the first annotation name for the given stereotype.
|
default Optional<String> |
getAnnotationNameByStereotype(String stereotype)
Find the first annotation name for the given stereotype.
|
default Set<String> |
getAnnotationNames()
All the annotation names this metadata declares.
|
default List<String> |
getAnnotationNamesByStereotype(Class<? extends Annotation> stereotype)
Resolve all of the annotation names that feature the given stereotype.
|
default List<String> |
getAnnotationNamesByStereotype(String stereotype)
Resolve all of the annotation names that feature the given stereotype.
|
default Optional<Class<? extends Annotation>> |
getAnnotationType(String name)
Gets the type for a given annotation if it is present on the classpath.
|
default Optional<Class<? extends Annotation>> |
getAnnotationType(String name,
ClassLoader classLoader)
Gets the type for a given annotation if it is present on the classpath.
|
default Optional<Class<? extends Annotation>> |
getAnnotationTypeByStereotype(Class<? extends Annotation> stereotype)
Find the first annotation name for the given stereotype.
|
default Optional<Class<? extends Annotation>> |
getAnnotationTypeByStereotype(String stereotype)
Find the first annotation name for the given stereotype.
|
default List<Class<? extends Annotation>> |
getAnnotationTypesByStereotype(Class<? extends Annotation> stereotype)
Resolve all of the annotation names that feature the given stereotype.
|
default List<Class<? extends Annotation>> |
getAnnotationTypesByStereotype(Class<? extends Annotation> stereotype,
ClassLoader classLoader)
Resolve all of the annotation names that feature the given stereotype.
|
default List<Class<? extends Annotation>> |
getAnnotationTypesByStereotype(String stereotype)
Resolve all of the annotation names that feature the given stereotype.
|
default <T extends Annotation> |
getAnnotationValuesByName(String annotationType)
Gets all the annotation values by the given repeatable type name.
|
default <T extends Annotation> |
getAnnotationValuesByStereotype(String stereotype)
Resolve all of the annotation values that feature the given stereotype.
|
default <T extends Annotation> |
getAnnotationValuesByType(Class<T> annotationType)
Gets all the annotation values by the given repeatable type.
|
default Optional<String> |
getDeclaredAnnotationNameByStereotype(String stereotype)
Find the first annotation name for the given stereotype.
|
default Set<String> |
getDeclaredAnnotationNames()
All the declared annotation names this metadata declares.
|
default List<String> |
getDeclaredAnnotationNamesByStereotype(String stereotype)
Resolve all of the annotations names for the given stereotype that are declared annotations.
|
default Optional<Class<? extends Annotation>> |
getDeclaredAnnotationTypeByStereotype(Class<? extends Annotation> stereotype)
Find the first declared annotation name for the given stereotype.
|
default Optional<Class<? extends Annotation>> |
getDeclaredAnnotationTypeByStereotype(String stereotype)
Find the first annotation name for the given stereotype.
|
default <T extends Annotation> |
getDeclaredAnnotationValuesByName(String annotationType)
Gets only declared annotation values by the given repeatable type name.
|
default <T extends Annotation> |
getDeclaredAnnotationValuesByType(Class<T> annotationType)
Gets only declared annotation values by the given repeatable type.
|
default AnnotationMetadata |
getDeclaredMetadata()
Gets the declared metadata without inherited metdata.
|
default Set<String> |
getDeclaredStereotypeAnnotationNames()
Returns the names of the annotations which are declared stereotypes.
|
default <T> Optional<T> |
getDefaultValue(Class<? extends Annotation> annotation,
String member,
Argument<T> requiredType)
Return the default value for the given annotation member.
|
default <T> Optional<T> |
getDefaultValue(Class<? extends Annotation> annotation,
String member,
Class<T> requiredType)
Return the default value for the given annotation member.
|
default <T> Optional<T> |
getDefaultValue(String annotation,
String member,
Argument<T> requiredType)
Return the default value for the given annotation member.
|
default <T> Optional<T> |
getDefaultValue(String annotation,
String member,
Class<T> requiredType)
Return the default value for the given annotation member.
|
default Map<String,Object> |
getDefaultValues(String annotation)
Return the default values for the given annotation name.
|
default Set<String> |
getStereotypeAnnotationNames()
Returns the names of the annotations which are stereotypes.
|
default Optional<Object> |
getValue(Class<? extends Annotation> annotation)
Get the value of default "value" the given annotation.
|
default <T> Optional<T> |
getValue(Class<? extends Annotation> annotation,
Argument<T> requiredType)
Get the value of default "value" the given annotation.
|
default <T> Optional<T> |
getValue(Class<? extends Annotation> annotation,
Class<T> requiredType)
Get the value of default "value" the given annotation.
|
default Optional<Object> |
getValue(Class<? extends Annotation> annotation,
String member)
Get the value of the given annotation member.
|
default <T> Optional<T> |
getValue(Class<? extends Annotation> annotation,
String member,
Argument<T> requiredType)
Get the value of the given annotation member.
|
default <T> Optional<T> |
getValue(Class<? extends Annotation> annotation,
String member,
Class<T> requiredType)
Get the value of the given annotation member.
|
default Optional<Object> |
getValue(String annotation)
Get the value of default "value" the given annotation.
|
default <T> Optional<T> |
getValue(String annotation,
Argument<T> requiredType)
Get the value of default "value" the given annotation.
|
default <T> Optional<T> |
getValue(String annotation,
Class<T> requiredType)
Get the value of default "value" the given annotation.
|
default Optional<Object> |
getValue(String annotation,
String member)
Get the value of the given annotation member.
|
default <T> Optional<T> |
getValue(String annotation,
String member,
Argument<T> requiredType)
Get the value of the given annotation member.
|
default <T> Optional<T> |
getValue(String annotation,
String member,
Class<T> requiredType)
Get the value of the given annotation member.
|
default <T> OptionalValues<T> |
getValues(Class<? extends Annotation> annotation,
Class<T> valueType)
Get all of the values for the given annotation.
|
default Map<CharSequence,Object> |
getValues(String annotation)
Get all of the values for the given annotation and type of the underlying values.
|
default <T> OptionalValues<T> |
getValues(String annotation,
Class<T> valueType)
Get all of the values for the given annotation and type of the underlying values.
|
default boolean |
hasAnnotation(Class<? extends Annotation> annotation)
Checks whether this object has the given annotation on the object itself or inherited from a parent.
|
default boolean |
hasAnnotation(String annotation)
Checks whether this object has the given annotation on the object itself or inherited from a parent.
|
default boolean |
hasDeclaredAnnotation(Class<? extends Annotation> annotation)
Checks whether this object has the given annotation directly declared on the object.
|
default boolean |
hasDeclaredAnnotation(String annotation)
Checks whether this object has the given annotation directly declared on the object.
|
default boolean |
hasDeclaredStereotype(Class<? extends Annotation>... annotations)
Checks whether this object has any of the given stereotype directly declared on the object.
|
default boolean |
hasDeclaredStereotype(Class<? extends Annotation> stereotype)
Checks whether this object has the given stereotype directly declared on the object.
|
default boolean |
hasDeclaredStereotype(String... annotations)
Checks whether this object has any of the given stereotype directly declared on the object.
|
default boolean |
hasDeclaredStereotype(String annotation)
Checks whether this object has the given annotation stereotype on the object itself and not inherited from a parent
|
default boolean |
hasPropertyExpressions()
Does the metadata contain any property expressions like
${foo.bar} . |
default boolean |
hasSimpleAnnotation(String annotation)
Checks whether the given annotation simple name (name without the package) is present in the annotations.
|
default boolean |
hasSimpleDeclaredAnnotation(String annotation)
Checks whether the given annotation simple name (name without the package) is present in the declared annotations.
|
default boolean |
hasStereotype(Class<? extends Annotation>... annotations)
Check whether any of the given stereotypes is present.
|
default boolean |
hasStereotype(Class<? extends Annotation> annotation)
Checks whether this object has the given annotation stereotype on the object itself or inherited from a parent
|
default boolean |
hasStereotype(String annotation)
Checks whether this object has the given annotation stereotype on the object itself or inherited from a parent
|
default boolean |
hasStereotype(String[] annotations)
Check whether any of the given stereotypes is present.
|
default OptionalInt |
intValue(Class<? extends Annotation> annotation)
The value as an
OptionalInt for the given annotation and member. |
default OptionalInt |
intValue(Class<? extends Annotation> annotation,
String member)
The value as an
OptionalInt for the given annotation and member. |
default OptionalInt |
intValue(String annotation,
String member)
The value as an
OptionalInt for the given annotation and member. |
default boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass)
Return whether an annotation is present.
|
default boolean |
isAnnotationPresent(String annotationName)
Return whether an annotation is present.
|
default boolean |
isDeclaredAnnotationPresent(Class<? extends Annotation> annotationClass)
Variation of
AnnotationSource.isAnnotationPresent(Class) for declared annotations. |
default boolean |
isDeclaredAnnotationPresent(String annotationName)
Variation of
AnnotationSource.isAnnotationPresent(String) for declared annotations. |
default boolean |
isEmpty()
Is the annotation metadata empty.
|
default boolean |
isFalse(Class<? extends Annotation> annotation,
String member)
Returns whether the value of the given member is true.
|
default boolean |
isFalse(String annotation,
String member)
Returns whether the value of the given member is true.
|
default boolean |
isPresent(Class<? extends Annotation> annotation,
String member)
Returns whether the value of the given member is present.
|
default boolean |
isPresent(String annotation,
String member)
Returns whether the value of the given member is present.
|
default boolean |
isRepeatableAnnotation(Class<? extends Annotation> annotation)
Is repeatable annotation?
|
default boolean |
isRepeatableAnnotation(String annotation)
Is repeatable annotation?
|
default boolean |
isTrue(Class<? extends Annotation> annotation,
String member)
Returns whether the value of the given member is true.
|
default boolean |
isTrue(String annotation,
String member)
Returns whether the value of the given member is true.
|
default OptionalLong |
longValue(Class<? extends Annotation> annotation,
String member)
The value as an
OptionalLong for the given annotation and member. |
default OptionalLong |
longValue(String annotation,
String member)
The value as an
OptionalLong for the given annotation and member. |
default Optional<String> |
stringValue(Class<? extends Annotation> annotation)
The value as an optional string for the given annotation and member.
|
default Optional<String> |
stringValue(Class<? extends Annotation> annotation,
String member)
The value as an optional string for the given annotation and member.
|
default Optional<String> |
stringValue(String annotation)
The value as an optional string for the given annotation and member.
|
default Optional<String> |
stringValue(String annotation,
String member)
The value as an optional string for the given annotation and member.
|
default String[] |
stringValues(Class<? extends Annotation> annotation)
The values as string array for the given annotation and member.
|
default String[] |
stringValues(Class<? extends Annotation> annotation,
String member)
The values as string array for the given annotation and member.
|
default String[] |
stringValues(String annotation)
The values as string array for the given annotation and member.
|
default String[] |
stringValues(String annotation,
String member)
The values as string array for the given annotation and member.
|
findAnnotation, findDeclaredAnnotation, getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
static final AnnotationMetadata EMPTY_METADATA
static final String VALUE_MEMBER
value()
member.static final String CLASS_NAME_SUFFIX
@NonNull default AnnotationMetadata getDeclaredMetadata()
default boolean hasPropertyExpressions()
${foo.bar}
. Note
this by default returns true
as previous versions of Micronaut must assume metadata
is present. The compilation time this is computed in order to decide whether to instrument
annotation metadata with environment specific logic.@NonNull default List<String> getAnnotationNamesByStereotype(@Nullable String stereotype)
stereotype
- The annotation names@NonNull default <T extends Annotation> List<AnnotationValue<T>> getAnnotationValuesByStereotype(@Nullable String stereotype)
T
- The annotation typestereotype
- The annotation names@NonNull default Set<String> getAnnotationNames()
@NonNull default Set<String> getStereotypeAnnotationNames()
A stereotype is a meta-annotation (an annotation declared on another annotation).
getDeclaredStereotypeAnnotationNames()
@NonNull default Set<String> getDeclaredStereotypeAnnotationNames()
A stereotype is a meta-annotation (an annotation declared on another annotation).
A stereotype is considered declared when it it is a meta-annotation that is present on an annotation directly declared on the element and not inherited from a super class.
getStereotypeAnnotationNames()
,
getDeclaredAnnotationNames()
@NonNull default Set<String> getDeclaredAnnotationNames()
@NonNull default List<String> getDeclaredAnnotationNamesByStereotype(@Nullable String stereotype)
stereotype
- The stereotype@NonNull default <T> OptionalValues<T> getValues(@NonNull String annotation, @NonNull Class<T> valueType)
T
- Generic typeannotation
- The annotation namevalueType
- valueTypeOptionalValues
@NonNull default Map<CharSequence,Object> getValues(@NonNull String annotation)
annotation
- The annotation namedefault <T> Optional<T> getDefaultValue(@NonNull String annotation, @NonNull String member, @NonNull Argument<T> requiredType)
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required type@NonNull default <T extends Annotation> List<AnnotationValue<T>> getAnnotationValuesByType(@NonNull Class<T> annotationType)
T
- The annotation typeannotationType
- The annotation type@NonNull default <T extends Annotation> List<AnnotationValue<T>> getAnnotationValuesByName(@NonNull String annotationType)
T
- The annotation typeannotationType
- The annotation type@NonNull default <T extends Annotation> List<AnnotationValue<T>> getDeclaredAnnotationValuesByType(@NonNull Class<T> annotationType)
T
- The annotation typeannotationType
- The annotation type@NonNull default <T extends Annotation> List<AnnotationValue<T>> getDeclaredAnnotationValuesByName(@NonNull String annotationType)
T
- The annotation typeannotationType
- The annotation typedefault boolean hasDeclaredAnnotation(@Nullable String annotation)
annotation
- The annotationdefault boolean hasAnnotation(@Nullable String annotation)
annotation
- The annotationdefault boolean hasSimpleAnnotation(@Nullable String annotation)
annotation
- The annotationdefault boolean hasSimpleDeclaredAnnotation(@Nullable String annotation)
annotation
- The annotationdefault boolean hasStereotype(@Nullable String annotation)
Checks whether this object has the given annotation stereotype on the object itself or inherited from a parent
.An annotation stereotype is a meta annotation potentially applied to another annotation
annotation
- The annotationdefault boolean hasDeclaredStereotype(@Nullable String annotation)
Checks whether this object has the given annotation stereotype on the object itself and not inherited from a parent
.An annotation stereotype is a meta annotation potentially applied to another annotation
annotation
- The annotationdefault boolean hasDeclaredStereotype(@Nullable String... annotations)
annotations
- The annotations@NonNull default Map<String,Object> getDefaultValues(@NonNull String annotation)
annotation
- The annotation namedefault <T> Optional<T> getDefaultValue(@NonNull String annotation, @NonNull String member, @NonNull Class<T> requiredType)
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required typedefault <T> Optional<T> getDefaultValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Argument<T> requiredType)
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required typedefault boolean isAnnotationPresent(@NonNull Class<? extends Annotation> annotationClass)
AnnotationSource
isAnnotationPresent
in interface AnnotationSource
annotationClass
- The annotation classAnnotationSource.isAnnotationPresent(Class)
default boolean isDeclaredAnnotationPresent(@NonNull Class<? extends Annotation> annotationClass)
AnnotationSource
AnnotationSource.isAnnotationPresent(Class)
for declared annotations.isDeclaredAnnotationPresent
in interface AnnotationSource
annotationClass
- The annotation classAnnotationSource.isAnnotationPresent(Class)
default boolean isAnnotationPresent(@NonNull String annotationName)
AnnotationSource
isAnnotationPresent
in interface AnnotationSource
annotationName
- The annotation nameAnnotationSource.isAnnotationPresent(String)
default boolean isDeclaredAnnotationPresent(@NonNull String annotationName)
AnnotationSource
AnnotationSource.isAnnotationPresent(String)
for declared annotations.isDeclaredAnnotationPresent
in interface AnnotationSource
annotationName
- The annotation nameAnnotationSource.isAnnotationPresent(String)
default <T> Optional<T> getDefaultValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Class<T> requiredType)
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required typedefault <T> Optional<T> getValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Class<T> requiredType)
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the valuedefault <T> Optional<T> getValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Argument<T> requiredType)
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the valuedefault Optional<String> getAnnotationNameByStereotype(@Nullable String stereotype)
stereotype
- The stereotypedefault Optional<String> getDeclaredAnnotationNameByStereotype(@Nullable String stereotype)
stereotype
- The stereotypedefault Optional<Class<? extends Annotation>> getAnnotationTypeByStereotype(@NonNull Class<? extends Annotation> stereotype)
stereotype
- The stereotypedefault Optional<Class<? extends Annotation>> getDeclaredAnnotationTypeByStereotype(@NonNull Class<? extends Annotation> stereotype)
stereotype
- The stereotypedefault Optional<Class<? extends Annotation>> getDeclaredAnnotationTypeByStereotype(@Nullable String stereotype)
stereotype
- The stereotypedefault Optional<Class<? extends Annotation>> getAnnotationType(@NonNull String name, @NonNull ClassLoader classLoader)
name
- The type nameclassLoader
- The ClassLoader to load the typedefault Optional<Class<? extends Annotation>> getAnnotationType(@NonNull String name)
name
- The type namedefault Optional<Class<? extends Annotation>> getAnnotationTypeByStereotype(@Nullable String stereotype)
stereotype
- The stereotypedefault Optional<String> getAnnotationNameByStereotype(@NonNull Class<? extends Annotation> stereotype)
stereotype
- The stereotype@NonNull default <T> OptionalValues<T> getValues(@NonNull Class<? extends Annotation> annotation, @NonNull Class<T> valueType)
T
- Generic typeannotation
- The annotation namevalueType
- valueTypeOptionalValues
@NonNull default List<String> getAnnotationNamesByStereotype(@NonNull Class<? extends Annotation> stereotype)
stereotype
- The annotation names@NonNull default List<Class<? extends Annotation>> getAnnotationTypesByStereotype(@NonNull Class<? extends Annotation> stereotype)
stereotype
- The annotation names@NonNull default List<Class<? extends Annotation>> getAnnotationTypesByStereotype(@NonNull String stereotype)
stereotype
- The annotation names@NonNull default List<Class<? extends Annotation>> getAnnotationTypesByStereotype(@NonNull Class<? extends Annotation> stereotype, @NonNull ClassLoader classLoader)
stereotype
- The annotation namesclassLoader
- The classloader to load annotation typedefault <T extends Annotation> Optional<AnnotationValue<T>> findAnnotation(@NonNull Class<T> annotationClass)
findAnnotation
in interface AnnotationSource
T
- The annotation typeannotationClass
- The annotation nameAnnotationValue
default <T extends Annotation> Optional<AnnotationValue<T>> findDeclaredAnnotation(@NonNull Class<T> annotationClass)
findDeclaredAnnotation
in interface AnnotationSource
T
- The annotation typeannotationClass
- The annotation nameAnnotationValue
instancedefault <T> Optional<T> getValue(@NonNull String annotation, @NonNull String member, @NonNull Class<T> requiredType)
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the valuedefault <T> Optional<T> getValue(@NonNull String annotation, @NonNull String member, @NonNull Argument<T> requiredType)
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the valuedefault OptionalLong longValue(@NonNull String annotation, @NonNull String member)
OptionalLong
for the given annotation and member.annotation
- The annotationmember
- The memberOptionalLong
valuedefault OptionalLong longValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
OptionalLong
for the given annotation and member.annotation
- The annotationmember
- The memberOptionalLong
valuedefault <E extends Enum> Optional<E> enumValue(@NonNull String annotation, Class<E> enumType)
E
- The enum typeannotation
- The annotationenumType
- The enum typeOptional
enum valuedefault <E extends Enum> Optional<E> enumValue(@NonNull String annotation, @NonNull String member, Class<E> enumType)
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum typeOptional
classdefault <E extends Enum> Optional<E> enumValue(@NonNull Class<? extends Annotation> annotation, Class<E> enumType)
E
- The enum typeannotation
- The annotationenumType
- The enum typeOptional
classdefault <E extends Enum> Optional<E> enumValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member, Class<E> enumType)
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum typeOptional
classdefault <E extends Enum> E[] enumValues(@NonNull String annotation, Class<E> enumType)
E
- The enum typeannotation
- The annotationenumType
- The enum typedefault <E extends Enum> E[] enumValues(@NonNull String annotation, @NonNull String member, Class<E> enumType)
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum typedefault <E extends Enum> E[] enumValues(@NonNull Class<? extends Annotation> annotation, Class<E> enumType)
E
- The enum typeannotation
- The annotationenumType
- The enum typedefault <E extends Enum> E[] enumValues(@NonNull Class<? extends Annotation> annotation, @NonNull String member, Class<E> enumType)
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum type@NonNull default <T> Class<T>[] classValues(@NonNull String annotation)
T
- The type of the classannotation
- The annotationOptional
class@NonNull default <T> Class<T>[] classValues(@NonNull String annotation, @NonNull String member)
T
- The type of the classannotation
- The annotationmember
- The annotation memberOptional
class@NonNull default <T> Class<T>[] classValues(@NonNull Class<? extends Annotation> annotation)
T
- The type of the classannotation
- The annotationOptional
class@NonNull default <T> Class<T>[] classValues(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
T
- The type of the classannotation
- The annotationmember
- The annotation memberOptional
classdefault Optional<Class> classValue(@NonNull String annotation)
annotation
- The annotationOptional
classdefault Optional<Class> classValue(@NonNull String annotation, @NonNull String member)
annotation
- The annotationmember
- The annotation memberOptional
classdefault Optional<Class> classValue(@NonNull Class<? extends Annotation> annotation)
annotation
- The annotationOptional
classdefault Optional<Class> classValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotationmember
- The annotation memberOptional
classdefault OptionalInt intValue(@NonNull String annotation, @NonNull String member)
OptionalInt
for the given annotation and member.annotation
- The annotationmember
- The memberOptionalInt
valuedefault OptionalInt intValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
OptionalInt
for the given annotation and member.annotation
- The annotationmember
- The memberOptionalInt
valuedefault OptionalInt intValue(@NonNull Class<? extends Annotation> annotation)
OptionalInt
for the given annotation and member.annotation
- The annotationOptionalInt
valuedefault Optional<String> stringValue(@NonNull String annotation, @NonNull String member)
annotation
- The annotationmember
- The memberdefault Optional<String> stringValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotationmember
- The member@NonNull default Optional<String> stringValue(@NonNull Class<? extends Annotation> annotation)
annotation
- The annotation@NonNull default Optional<String> stringValue(@NonNull String annotation)
annotation
- The annotationdefault Optional<Boolean> booleanValue(@NonNull String annotation, @NonNull String member)
annotation
- The annotationmember
- The memberdefault Optional<Boolean> booleanValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotationmember
- The member@NonNull default Optional<Boolean> booleanValue(@NonNull Class<? extends Annotation> annotation)
annotation
- The annotation@NonNull default Optional<Boolean> booleanValue(@NonNull String annotation)
annotation
- The annotation@NonNull default String[] stringValues(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotationmember
- The member@NonNull default String[] stringValues(@NonNull Class<? extends Annotation> annotation)
annotation
- The annotation@NonNull default String[] stringValues(@NonNull String annotation, @NonNull String member)
annotation
- The annotationmember
- The member@NonNull default String[] stringValues(@NonNull String annotation)
annotation
- The annotation@NonNull default OptionalDouble doubleValue(@NonNull String annotation, @NonNull String member)
OptionalDouble
for the given annotation and member.annotation
- The annotationmember
- The memberOptionalDouble
value@NonNull default OptionalDouble doubleValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
OptionalDouble
for the given annotation and member.annotation
- The annotationmember
- The memberOptionalDouble
value@NonNull default OptionalDouble doubleValue(@NonNull Class<? extends Annotation> annotation)
OptionalDouble
for the given annotation and member.annotation
- The annotationOptionalDouble
value@NonNull default <T> Optional<T> getValue(@NonNull String annotation, @NonNull Class<T> requiredType)
T
- The valueannotation
- The annotation classrequiredType
- The required typeOptional
of the value@NonNull default Optional<Object> getValue(@NonNull String annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation memberOptional
of the value@NonNull default Optional<Object> getValue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation memberOptional
of the valuedefault boolean isTrue(@NonNull String annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation memberdefault boolean isTrue(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation memberdefault boolean isPresent(@NonNull String annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation memberdefault boolean isPresent(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation memberdefault boolean isFalse(@NonNull Class<? extends Annotation> annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation memberdefault boolean isFalse(@NonNull String annotation, @NonNull String member)
annotation
- The annotation classmember
- The annotation member@NonNull default Optional<Object> getValue(@NonNull String annotation)
annotation
- The annotation classOptional
of the value@NonNull default Optional<Object> getValue(@NonNull Class<? extends Annotation> annotation)
annotation
- The annotation classOptional
of the value@NonNull default <T> Optional<T> getValue(@NonNull Class<? extends Annotation> annotation, @NonNull Class<T> requiredType)
T
- Generic typeannotation
- The annotation classrequiredType
- requiredTypeOptional
of the value@NonNull default <T> Optional<T> getValue(@NonNull Class<? extends Annotation> annotation, @NonNull Argument<T> requiredType)
T
- Generic typeannotation
- The annotation classrequiredType
- requiredTypeOptional
of the value@NonNull default <T> Optional<T> getValue(@NonNull String annotation, @NonNull Argument<T> requiredType)
T
- Generic typeannotation
- The annotation classrequiredType
- requiredTypeOptional
of the valuedefault boolean hasAnnotation(@Nullable Class<? extends Annotation> annotation)
annotation
- The annotationdefault boolean hasStereotype(@Nullable Class<? extends Annotation> annotation)
Checks whether this object has the given annotation stereotype on the object itself or inherited from a parent
.An annotation stereotype is a meta annotation potentially applied to another annotation
annotation
- The annotationdefault boolean hasStereotype(@Nullable Class<? extends Annotation>... annotations)
annotations
- The annotationsdefault boolean hasStereotype(@Nullable String[] annotations)
annotations
- The annotationsdefault boolean hasDeclaredAnnotation(@Nullable Class<? extends Annotation> annotation)
annotation
- The annotationdefault boolean hasDeclaredStereotype(@Nullable Class<? extends Annotation> stereotype)
stereotype
- The annotationdefault boolean hasDeclaredStereotype(@Nullable Class<? extends Annotation>... annotations)
annotations
- The annotationsdefault boolean isRepeatableAnnotation(@NonNull Class<? extends Annotation> annotation)
annotation
- The annotationdefault boolean isRepeatableAnnotation(@NonNull String annotation)
annotation
- The annotationdefault Optional<String> findRepeatableAnnotation(@NonNull Class<? extends Annotation> annotation)
annotation
- The annotationdefault Optional<String> findRepeatableAnnotation(@NonNull String annotation)
annotation
- The annotationdefault boolean isEmpty()