Package io.micronaut.inject.annotation
Class MappingAnnotationMetadataDelegate
java.lang.Object
io.micronaut.inject.annotation.MappingAnnotationMetadataDelegate
- All Implemented Interfaces:
AnnotationMetadata
,AnnotationMetadataDelegate
,AnnotationMetadataProvider
,AnnotationSource
- Direct Known Subclasses:
EvaluatedAnnotationMetadata
public abstract sealed class MappingAnnotationMetadataDelegate
extends Object
implements AnnotationMetadataDelegate
permits EvaluatedAnnotationMetadata
Abstract annotation metadata delegate for cases when annotation
values need to be mapped before being returned.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbooleanValue
(Class<? extends Annotation> annotation) The value as an optional boolean for the given annotation and member.booleanValue
(Class<? extends Annotation> annotation, String member) The value as an optional boolean for the given annotation and member.booleanValue
(String annotation) The value as an optional boolean for the given annotation and member.booleanValue
(String annotation, String member) The value as an optional boolean for the given annotation and member.classValue
(Class<? extends Annotation> annotation) The value of the annotation as a Class.classValue
(Class<? extends Annotation> annotation, String member) The value of the annotation as a Class.classValue
(String annotation) The value of the annotation as a Class.classValue
(String annotation, String member) The value of the annotation as a Class.<T> Class<T>[]
classValues
(Class<? extends Annotation> annotation) The value of the annotation as a Class.<T> Class<T>[]
classValues
(Class<? extends Annotation> annotation, String member) The value of the annotation as a Class.<T> Class<T>[]
classValues
(String annotation) The value of the annotation as a Class.<T> Class<T>[]
classValues
(String annotation, String member) The value of the annotation as a Class.doubleValue
(Class<? extends Annotation> annotation) The value as anOptionalDouble
for the given annotation and member.doubleValue
(Class<? extends Annotation> annotation, String member) The value as anOptionalDouble
for the given annotation and member.doubleValue
(String annotation, String member) The value as anOptionalDouble
for the given annotation and member.enumValue
(Class<? extends Annotation> annotation, Class<E> enumType) The value of the annotation as a Class.enumValue
(Class<? extends Annotation> annotation, String member, Class<E> enumType) The value of the annotation as a Class.The value of the given enum.The value of the annotation as a Class.<E extends Enum<E>>
E[]enumValues
(Class<? extends Annotation> annotation, Class<E> enumType) The enum values for the given annotation.<E extends Enum<E>>
E[]enumValues
(Class<? extends Annotation> annotation, String member, Class<E> enumType) The enum values for the given annotation.<E extends Enum<E>>
E[]enumValues
(String annotation, Class<E> enumType) The enum values for the given annotation.<E extends Enum<E>>
E[]enumValues
(String annotation, String member, Class<E> enumType) The enum values for the given annotation.<T extends Annotation>
Optional<AnnotationValue<T>>findAnnotation
(Class<T> annotationClass) Find anAnnotationValue
for the given annotation type.<T extends Annotation>
Optional<AnnotationValue<T>>findAnnotation
(String annotation) Find anAnnotationValue
for the given annotation name.<T extends Annotation>
Optional<AnnotationValue<T>>findDeclaredAnnotation
(Class<T> annotationClass) Get all of the values for the given annotation that are directly declared on the annotated element.<T extends Annotation>
Optional<AnnotationValue<T>>findDeclaredAnnotation
(String annotation) Get all of the values for the given annotation that are directly declared on the annotated element.<T extends Annotation>
AnnotationValue<T>getAnnotation
(Class<T> annotationClass) Find anAnnotationValue
for the given annotation name.<T extends Annotation>
AnnotationValue<T>getAnnotation
(String annotation) Find anAnnotationValue
for the given annotation name.<T extends Annotation>
List<AnnotationValue<T>>getAnnotationValuesByName
(String annotationType) Gets all the annotation values by the given repeatable type name.<T extends Annotation>
List<AnnotationValue<T>>getAnnotationValuesByStereotype
(String stereotype) Resolve all of the annotation values that feature the given stereotype.<T extends Annotation>
List<AnnotationValue<T>>getAnnotationValuesByType
(Class<T> annotationType) Gets all the annotation values by the given repeatable type.<T extends Annotation>
AnnotationValue<T>getDeclaredAnnotation
(Class<T> annotationClass) Find anAnnotationValue
for the given annotation name.<T extends Annotation>
List<AnnotationValue<T>>getDeclaredAnnotationValuesByName
(String annotationType) Gets only declared annotation values by the given repeatable type name.<T extends Annotation>
List<AnnotationValue<T>>getDeclaredAnnotationValuesByType
(Class<T> annotationType) Gets only declared annotation values by the given repeatable type.getValue
(Class<? extends Annotation> annotation) Get the value of default "value" the given annotation.<T> Optional<T>
getValue
(Class<? extends Annotation> annotation, Argument<T> requiredType) Get the value of default "value" the given annotation.<T> Optional<T>
getValue
(Class<? extends Annotation> annotation, Class<T> requiredType) Get the value of default "value" the given annotation.getValue
(Class<? extends Annotation> annotation, String member) Get the value of the given annotation member.<T> Optional<T>
getValue
(Class<? extends Annotation> annotation, String member, Argument<T> requiredType) Get the value of the given annotation member.<T> Optional<T>
getValue
(Class<? extends Annotation> annotation, String member, Class<T> requiredType) Get the value of the given annotation member.Get the value of default "value" the given annotation.<T> Optional<T>
Get the value of default "value" the given annotation.<T> Optional<T>
Get the value of default "value" the given annotation.Get the value of the given annotation member.<T> Optional<T>
Get the value of the given annotation member.<T> Optional<T>
Get the value of the given annotation member.<T> OptionalValues<T>
getValues
(Class<? extends Annotation> annotation, Class<T> valueType) Get all of the values for the given annotation.Get all of the values for the given annotation and type of the underlying values.<T> OptionalValues<T>
Get all of the values for the given annotation and type of the underlying values.intValue
(Class<? extends Annotation> annotation) The value as anOptionalInt
for the given annotation and member.intValue
(Class<? extends Annotation> annotation, String member) The value as anOptionalInt
for the given annotation and member.The value as anOptionalInt
for the given annotation and member.boolean
isFalse
(Class<? extends Annotation> annotation, String member) Returns whether the value of the given member is true.boolean
Returns whether the value of the given member is true.boolean
isTrue
(Class<? extends Annotation> annotation, String member) Returns whether the value of the given member is true.boolean
Returns whether the value of the given member is true.longValue
(Class<? extends Annotation> annotation, String member) The value as anOptionalLong
for the given annotation and member.The value as anOptionalLong
for the given annotation and member.abstract <T extends Annotation>
AnnotationValue<T>stringValue
(Class<? extends Annotation> annotation) The value as an optional string for the given annotation and member.stringValue
(Class<? extends Annotation> annotation, String member) The value as an optional string for the given annotation and member.stringValue
(String annotation) The value as an optional string for the given annotation and member.stringValue
(String annotation, String member) The value as an optional string for the given annotation and member.String[]
stringValues
(Class<? extends Annotation> annotation) The values as string array for the given annotation and member.String[]
stringValues
(Class<? extends Annotation> annotation, String member) The values as string array for the given annotation and member.String[]
stringValues
(String annotation) The values as string array for the given annotation and member.String[]
stringValues
(String annotation, String member) The values as string array for the given annotation and member.<T extends Annotation>
Tsynthesize
(Class<T> annotationClass) Synthesizes a new annotation from the metadata for the given annotation type.<T extends Annotation>
Tsynthesize
(Class<T> annotationClass, String sourceAnnotation) Synthesizes a new annotation for the given annotation type using the member values of the given source annotation.<T extends Annotation>
T[]synthesizeAnnotationsByType
(Class<T> annotationClass) Synthesizes a new annotations from the metadata for the given type.<T extends Annotation>
TsynthesizeDeclared
(Class<T> annotationClass) Synthesizes a new annotation from the metadata for the given annotation type.<T extends Annotation>
TsynthesizeDeclared
(Class<T> annotationClass, String sourceAnnotation) Synthesizes a new annotation declared for the given annotation type using the member values of the given source annotation.<T extends Annotation>
T[]synthesizeDeclaredAnnotationsByType
(Class<T> annotationClass) Synthesizes a new annotations from the metadata for the given type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
copyAnnotationMetadata, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, synthesizeAll, synthesizeDeclared
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadata
-
Constructor Details
-
MappingAnnotationMetadataDelegate
public MappingAnnotationMetadataDelegate()
-
-
Method Details
-
mapAnnotationValue
-
stringValue
Description copied from interface:AnnotationMetadata
The value as an optional string for the given annotation and member.- Specified by:
stringValue
in interfaceAnnotationMetadata
- Specified by:
stringValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
stringValue
Description copied from interface:AnnotationMetadata
The value as an optional string for the given annotation and member.- Specified by:
stringValue
in interfaceAnnotationMetadata
- Specified by:
stringValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
stringValue
Description copied from interface:AnnotationMetadata
The value as an optional string for the given annotation and member.- Specified by:
stringValue
in interfaceAnnotationMetadata
- Specified by:
stringValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- The string value if it is present
-
stringValue
Description copied from interface:AnnotationMetadata
The value as an optional string for the given annotation and member.- Specified by:
stringValue
in interfaceAnnotationMetadata
- Specified by:
stringValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- The string value if it is present
-
stringValues
Description copied from interface:AnnotationMetadata
The values as string array for the given annotation and member.- Specified by:
stringValues
in interfaceAnnotationMetadata
- Specified by:
stringValues
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string values if it is present
-
stringValues
Description copied from interface:AnnotationMetadata
The values as string array for the given annotation and member.- Specified by:
stringValues
in interfaceAnnotationMetadata
- Specified by:
stringValues
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string values if it is present
-
stringValues
Description copied from interface:AnnotationMetadata
The values as string array for the given annotation and member.- Specified by:
stringValues
in interfaceAnnotationMetadata
- Specified by:
stringValues
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- The string values if it is present
-
stringValues
Description copied from interface:AnnotationMetadata
The values as string array for the given annotation and member.- Specified by:
stringValues
in interfaceAnnotationMetadata
- Specified by:
stringValues
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- The string values if it is present
-
enumValue
Description copied from interface:AnnotationMetadata
The value of the given enum.- Specified by:
enumValue
in interfaceAnnotationMetadata
- Specified by:
enumValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An
Optional
enum value
-
enumValue
public <E extends Enum<E>> Optional<E> enumValue(String annotation, String member, Class<E> enumType) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
enumValue
in interfaceAnnotationMetadata
- Specified by:
enumValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationmember
- The annotation memberenumType
- The enum type- Returns:
- An
Optional
class
-
enumValue
public <E extends Enum<E>> Optional<E> enumValue(Class<? extends Annotation> annotation, Class<E> enumType) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
enumValue
in interfaceAnnotationMetadata
- Specified by:
enumValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An
Optional
class
-
enumValue
public <E extends Enum<E>> Optional<E> enumValue(Class<? extends Annotation> annotation, String member, Class<E> enumType) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
enumValue
in interfaceAnnotationMetadata
- Specified by:
enumValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationmember
- The annotation memberenumType
- The enum type- Returns:
- An
Optional
class
-
enumValues
Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- Specified by:
enumValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationmember
- The annotation memberenumType
- The enum type- Returns:
- An array of enum values
-
enumValues
Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- Specified by:
enumValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An array of enum values
-
enumValues
public <E extends Enum<E>> E[] enumValues(Class<? extends Annotation> annotation, Class<E> enumType) Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- Specified by:
enumValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An array of enum values
-
enumValues
public <E extends Enum<E>> E[] enumValues(Class<? extends Annotation> annotation, String member, Class<E> enumType) Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- Specified by:
enumValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationmember
- The annotation memberenumType
- The enum type- Returns:
- An array of enum values
-
classValues
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValues
in interfaceAnnotationMetadata
- Specified by:
classValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The type of the class- Parameters:
annotation
- The annotationmember
- The annotation member- Returns:
- An
Optional
class
-
classValues
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValues
in interfaceAnnotationMetadata
- Specified by:
classValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The type of the class- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValues
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValues
in interfaceAnnotationMetadata
- Specified by:
classValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The type of the class- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValues
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValues
in interfaceAnnotationMetadata
- Specified by:
classValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The type of the class- Parameters:
annotation
- The annotationmember
- The annotation member- Returns:
- An
Optional
class
-
booleanValue
Description copied from interface:AnnotationMetadata
The value as an optional boolean for the given annotation and member.- Specified by:
booleanValue
in interfaceAnnotationMetadata
- Specified by:
booleanValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
booleanValue
Description copied from interface:AnnotationMetadata
The value as an optional boolean for the given annotation and member.- Specified by:
booleanValue
in interfaceAnnotationMetadata
- Specified by:
booleanValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
booleanValue
Description copied from interface:AnnotationMetadata
The value as an optional boolean for the given annotation and member.- Specified by:
booleanValue
in interfaceAnnotationMetadata
- Specified by:
booleanValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- The string value if it is present
-
booleanValue
Description copied from interface:AnnotationMetadata
The value as an optional boolean for the given annotation and member.- Specified by:
booleanValue
in interfaceAnnotationMetadata
- Specified by:
booleanValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- The string value if it is present
-
isTrue
Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is true.- Specified by:
isTrue
in interfaceAnnotationMetadata
- Specified by:
isTrue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
isTrue
Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is true.- Specified by:
isTrue
in interfaceAnnotationMetadata
- Specified by:
isTrue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
isFalse
Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is true.- Specified by:
isFalse
in interfaceAnnotationMetadata
- Specified by:
isFalse
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
isFalse
Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is true.- Specified by:
isFalse
in interfaceAnnotationMetadata
- Specified by:
isFalse
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
classValue
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Specified by:
classValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The annotation member- Returns:
- An
Optional
class
-
classValue
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Specified by:
classValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValue
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Specified by:
classValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValue
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Specified by:
classValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The annotation member- Returns:
- An
Optional
class
-
intValue
Description copied from interface:AnnotationMetadata
The value as anOptionalInt
for the given annotation and member.- Specified by:
intValue
in interfaceAnnotationMetadata
- Specified by:
intValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalInt
value
-
intValue
Description copied from interface:AnnotationMetadata
The value as anOptionalInt
for the given annotation and member.- Specified by:
intValue
in interfaceAnnotationMetadata
- Specified by:
intValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalInt
value
-
intValue
Description copied from interface:AnnotationMetadata
The value as anOptionalInt
for the given annotation and member.- Specified by:
intValue
in interfaceAnnotationMetadata
- Specified by:
intValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- THe
OptionalInt
value
-
longValue
Description copied from interface:AnnotationMetadata
The value as anOptionalLong
for the given annotation and member.- Specified by:
longValue
in interfaceAnnotationMetadata
- Specified by:
longValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalLong
value
-
longValue
Description copied from interface:AnnotationMetadata
The value as anOptionalLong
for the given annotation and member.- Specified by:
longValue
in interfaceAnnotationMetadata
- Specified by:
longValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalLong
value
-
doubleValue
Description copied from interface:AnnotationMetadata
The value as anOptionalDouble
for the given annotation and member.- Specified by:
doubleValue
in interfaceAnnotationMetadata
- Specified by:
doubleValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalDouble
value
-
doubleValue
Description copied from interface:AnnotationMetadata
The value as anOptionalDouble
for the given annotation and member.- Specified by:
doubleValue
in interfaceAnnotationMetadata
- Specified by:
doubleValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalDouble
value
-
doubleValue
Description copied from interface:AnnotationMetadata
The value as anOptionalDouble
for the given annotation and member.- Specified by:
doubleValue
in interfaceAnnotationMetadata
- Specified by:
doubleValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation- Returns:
- THe
OptionalDouble
value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getValue
public <T> Optional<T> getValue(Class<? extends Annotation> annotation, String member, Argument<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation classrequiredType
- requiredType- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation classrequiredType
- requiredType- Returns:
- An
Optional
of the value
-
getValue
public <T> Optional<T> getValue(Class<? extends Annotation> annotation, String member, Class<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation classrequiredType
- requiredType- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation class- Returns:
- An
Optional
of the value
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Specified by:
getValue
in interfaceAnnotationMetadataDelegate
- Parameters:
annotation
- The annotation class- Returns:
- An
Optional
of the value
-
getValues
Description copied from interface:AnnotationMetadata
Get all of the values for the given annotation.- Specified by:
getValues
in interfaceAnnotationMetadata
- Specified by:
getValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation namevalueType
- valueType- Returns:
- The
OptionalValues
-
getValues
Description copied from interface:AnnotationMetadata
Get all of the values for the given annotation and type of the underlying values.- Specified by:
getValues
in interfaceAnnotationMetadata
- Specified by:
getValues
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation namevalueType
- valueType- Returns:
- The
OptionalValues
-
getValues
Description copied from interface:AnnotationMetadata
Get all of the values for the given annotation and type of the underlying values.- Specified by:
getValues
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation name- Returns:
- An immutable map of values
-
getDeclaredAnnotation
Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- Specified by:
getDeclaredAnnotation
in interfaceAnnotationMetadataDelegate
- Specified by:
getDeclaredAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation name- Returns:
- A
AnnotationValue
instance or null
-
getAnnotation
Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- Specified by:
getAnnotation
in interfaceAnnotationMetadataDelegate
- Specified by:
getAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation name- Returns:
- A
AnnotationValue
instance or null
-
getAnnotation
Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- Specified by:
getAnnotation
in interfaceAnnotationMetadataDelegate
- Specified by:
getAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotation
- The annotation name- Returns:
- A
AnnotationValue
instance or null
-
findAnnotation
Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- Specified by:
findAnnotation
in interfaceAnnotationMetadataDelegate
- Specified by:
findAnnotation
in interfaceAnnotationMetadataProvider
- Specified by:
findAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotation
- The annotation name- Returns:
- A
AnnotationValue
instance
-
findAnnotation
Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation type.- Specified by:
findAnnotation
in interfaceAnnotationMetadata
- Specified by:
findAnnotation
in interfaceAnnotationMetadataDelegate
- Specified by:
findAnnotation
in interfaceAnnotationMetadataProvider
- Specified by:
findAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation- Returns:
- A
AnnotationValue
instance
-
findDeclaredAnnotation
public <T extends Annotation> Optional<AnnotationValue<T>> findDeclaredAnnotation(Class<T> annotationClass) Description copied from interface:AnnotationSource
Get all of the values for the given annotation that are directly declared on the annotated element.- Specified by:
findDeclaredAnnotation
in interfaceAnnotationMetadata
- Specified by:
findDeclaredAnnotation
in interfaceAnnotationMetadataDelegate
- Specified by:
findDeclaredAnnotation
in interfaceAnnotationMetadataProvider
- Specified by:
findDeclaredAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation name- Returns:
- A
AnnotationValue
instance
-
findDeclaredAnnotation
public <T extends Annotation> Optional<AnnotationValue<T>> findDeclaredAnnotation(String annotation) Description copied from interface:AnnotationSource
Get all of the values for the given annotation that are directly declared on the annotated element.- Specified by:
findDeclaredAnnotation
in interfaceAnnotationMetadataDelegate
- Specified by:
findDeclaredAnnotation
in interfaceAnnotationMetadataProvider
- Specified by:
findDeclaredAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotation
- The annotation name- Returns:
- A
AnnotationValue
instance
-
synthesizeDeclaredAnnotationsByType
Description copied from interface:AnnotationSource
Synthesizes a new annotations from the metadata for the given type. This method works by creating a runtime proxy of the annotation interface and should be avoided in favour of direct use of the annotation metadata and only used for unique cases that require integrating third party libraries.- Specified by:
synthesizeDeclaredAnnotationsByType
in interfaceAnnotationMetadataDelegate
- Specified by:
synthesizeDeclaredAnnotationsByType
in interfaceAnnotationMetadataProvider
- Specified by:
synthesizeDeclaredAnnotationsByType
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation generic type- Parameters:
annotationClass
- The annotation type- Returns:
- Declared annotations by the given type
-
synthesizeAnnotationsByType
Description copied from interface:AnnotationSource
Synthesizes a new annotations from the metadata for the given type. This method works by creating a runtime proxy of the annotation interface and should be avoided in favour of direct use of the annotation metadata and only used for unique cases that require integrating third party libraries.- Specified by:
synthesizeAnnotationsByType
in interfaceAnnotationMetadataDelegate
- Specified by:
synthesizeAnnotationsByType
in interfaceAnnotationMetadataProvider
- Specified by:
synthesizeAnnotationsByType
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation generic type- Parameters:
annotationClass
- The annotation type- Returns:
- All annotations by the given type
-
synthesizeDeclared
Description copied from interface:AnnotationSource
Synthesizes a new annotation from the metadata for the given annotation type. This method works by creating a runtime proxy of the annotation interface and should be avoided in favour of direct use of the annotation metadata and only used for unique cases that require integrating third party libraries.This method ignores inherited annotations. (Returns null if no annotations are directly present on this element.)
- Specified by:
synthesizeDeclared
in interfaceAnnotationMetadataDelegate
- Specified by:
synthesizeDeclared
in interfaceAnnotationMetadataProvider
- Specified by:
synthesizeDeclared
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation generic type- Parameters:
annotationClass
- The annotation class- Returns:
- The annotation or null if it doesn't exist
-
synthesize
Description copied from interface:AnnotationSource
Synthesizes a new annotation from the metadata for the given annotation type. This method works by creating a runtime proxy of the annotation interface and should be avoided in favour of direct use of the annotation metadata and only used for unique cases that require integrating third party libraries.- Specified by:
synthesize
in interfaceAnnotationMetadataDelegate
- Specified by:
synthesize
in interfaceAnnotationMetadataProvider
- Specified by:
synthesize
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation generic type- Parameters:
annotationClass
- The annotation class- Returns:
- The annotation or null if it doesn't exist
-
synthesize
Description copied from interface:AnnotationSource
Synthesizes a new annotation for the given annotation type using the member values of the given source annotation.This method allows supporting synthesizing annotations that have been renamed, for example a
jakarta.inject.Named
annotation an be synthesized from the metadata of the ajakarta.inject.Named
annotation.- Specified by:
synthesize
in interfaceAnnotationMetadataDelegate
- Specified by:
synthesize
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation generic type- Parameters:
annotationClass
- The annotation classsourceAnnotation
- The source annotation that provides the member values- Returns:
- The annotation or null if it doesn't exist
-
synthesizeDeclared
public <T extends Annotation> T synthesizeDeclared(Class<T> annotationClass, String sourceAnnotation) Description copied from interface:AnnotationSource
Synthesizes a new annotation declared for the given annotation type using the member values of the given source annotation.This method allows supporting synthesizing annotations that have been renamed, for example a
jakarta.inject.Named
annotation an be synthesized from the metadata of the ajakarta.inject.Named
annotation.- Specified by:
synthesizeDeclared
in interfaceAnnotationMetadataDelegate
- Specified by:
synthesizeDeclared
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation generic type- Parameters:
annotationClass
- The annotation classsourceAnnotation
- The source annotation that provides the member values- Returns:
- The annotation or null if it doesn't exist
-
getAnnotationValuesByType
public <T extends Annotation> List<AnnotationValue<T>> getAnnotationValuesByType(Class<T> annotationType) Description copied from interface:AnnotationMetadata
Gets all the annotation values by the given repeatable type.- Specified by:
getAnnotationValuesByType
in interfaceAnnotationMetadata
- Specified by:
getAnnotationValuesByType
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-
getDeclaredAnnotationValuesByType
public <T extends Annotation> List<AnnotationValue<T>> getDeclaredAnnotationValuesByType(Class<T> annotationType) Description copied from interface:AnnotationMetadata
Gets only declared annotation values by the given repeatable type.- Specified by:
getDeclaredAnnotationValuesByType
in interfaceAnnotationMetadata
- Specified by:
getDeclaredAnnotationValuesByType
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-
getAnnotationValuesByStereotype
public <T extends Annotation> List<AnnotationValue<T>> getAnnotationValuesByStereotype(String stereotype) Description copied from interface:AnnotationMetadata
Resolve all of the annotation values that feature the given stereotype.- Specified by:
getAnnotationValuesByStereotype
in interfaceAnnotationMetadata
- Specified by:
getAnnotationValuesByStereotype
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The annotation type- Parameters:
stereotype
- The annotation names- Returns:
- A set of annotation names
-
getDeclaredAnnotationValuesByName
public <T extends Annotation> List<AnnotationValue<T>> getDeclaredAnnotationValuesByName(String annotationType) Description copied from interface:AnnotationMetadata
Gets only declared annotation values by the given repeatable type name.- Specified by:
getDeclaredAnnotationValuesByName
in interfaceAnnotationMetadata
- Specified by:
getDeclaredAnnotationValuesByName
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-
getAnnotationValuesByName
public <T extends Annotation> List<AnnotationValue<T>> getAnnotationValuesByName(String annotationType) Description copied from interface:AnnotationMetadata
Gets all the annotation values by the given repeatable type name.- Specified by:
getAnnotationValuesByName
in interfaceAnnotationMetadata
- Specified by:
getAnnotationValuesByName
in interfaceAnnotationMetadataDelegate
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-