Interface AnnotationMetadataDelegate
- All Superinterfaces:
AnnotationMetadata
,AnnotationMetadataProvider
,AnnotationSource
- All Known Subinterfaces:
AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata
,AnnotationElement
,ArrayableClassElement
,BeanConstructorElement
,BeanDefinition<T>
,BeanDefinitionMethodReference<T,
,R> BeanDefinitionReference<T>
,BeanElement
,BeanElementBuilder
,BeanFieldElement
,BeanIntrospection<T>
,BeanMethodElement
,BeanParameterElement
,BeanProperty<B,
,T> ClassElement
,ConfigurableElement
,ConstructorElement
,ConstructorInvocationContext<T>
,DelegatingBeanDefinition<T>
,DelegatingExecutableMethod<T,
,R> DisposableBeanDefinition<T>
,Element
,ElementAnnotationMetadata
,ElementMutableAnnotationMetadataDelegate<R>
,EnumConstantElement
,EnumElement
,ExecutableMethod<T,
,R> ExecutionHandle<T,
,R> FieldElement
,GenericElement
,GenericPlaceholderElement
,InitializingBeanDefinition<T>
,InjectableBeanDefinition<T>
,InjectableElement
,InstantiatableBeanDefinition<T>
,InvocationContext<T,
,R> MemberElement
,MethodBasedRouteMatch<T,
,R> MethodElement
,MethodExecutionHandle<T,
,R> MethodInvocationContext<T,
,R> MethodReference<T,
,R> MutableAnnotationMetadataDelegate<R>
,PackageElement
,ParameterElement
,ParametrizedInstantiatableBeanDefinition<T>
,PropertyElement
,ProxyBeanDefinition<T>
,QualifiedBeanType<T>
,RuntimeBeanDefinition<T>
,TypedElement
,UnsafeBeanInstantiationIntrospection<T>
,UnsafeBeanProperty<B,
,T> UnsafeExecutionHandle<T,
,R> UriRouteMatch<T,
,R> ValidatedBeanDefinition<T>
,WildcardElement
- All Known Implementing Classes:
AbstractAnnotationElement
,AbstractBeanDefinitionBuilder
,AbstractBeanProperty
,AbstractElementAnnotationMetadata
,AbstractElementAnnotationMetadataFactory.AbstractElementAnnotationMetadata
,AbstractElementAnnotationMetadataFactory.MutableElementAnnotationMetadata
,AbstractExecutableBeanMethod
,AbstractExecutableMethod
,AbstractGroovyElement
,AbstractInitializableBeanDefinition
,AbstractInitializableBeanDefinitionReference
,AbstractInitializableBeanIntrospection
,AbstractJavaElement
,AbstractMutableAnnotationMetadata
,AbstractProviderDefinition
,AnnotationMetadataReference
,ApplicationEventPublisherFactory
,BeanDefinitionWriter
,BeanProviderDefinition
,ConstructorInterceptorChain
,DisabledBean
,EvaluatedAnnotationMetadata
,GenericPlaceholderElementAnnotationMetadata
,GroovyClassElement
,GroovyConstructorElement
,GroovyEnumConstantElement
,GroovyFieldElement
,GroovyMethodElement
,GroovyPackageElement
,GroovyParameterElement
,InterceptorChain
,InterceptorRegistryBean
,JakartaProviderBeanDefinition
,JavaClassElement
,JavaMethodElement
,JavaPackageElement
,JavaxProviderBeanDefinition
,MappingAnnotationMetadataDelegate
,MethodElementAnnotationMetadata
,MethodInterceptorChain
,MutatedMethodElementAnnotationMetadata
,PrimitiveElement
,PropertyElementAnnotationMetadata
,WildcardElementAnnotationMetadata
AnnotationMetadata
to the AnnotationMetadataProvider.getAnnotationMetadata()
method.- Since:
- 1.0
- Author:
- Graeme Rocher
-
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
-
Method Summary
Modifier and TypeMethodDescriptionbooleanValue
(@NonNull Class<? extends Annotation> annotation) The value as an optional boolean for the given annotation and member.booleanValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member) The value as an optional boolean for the given annotation and member.booleanValue
(@NonNull String annotation) The value as an optional boolean for the given annotation and member.booleanValue
(@NonNull String annotation, @NonNull String member) The value as an optional boolean for the given annotation and member.classValue
(@NonNull Class<? extends Annotation> annotation) The value of the annotation as a Class.classValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member) The value of the annotation as a Class.classValue
(@NonNull String annotation) The value of the annotation as a Class.classValue
(@NonNull String annotation, @NonNull String member) The value of the annotation as a Class.default <T> Class<T>[]
classValues
(@NonNull Class<? extends Annotation> annotation) The value of the annotation as a Class.default <T> Class<T>[]
classValues
(@NonNull Class<? extends Annotation> annotation, @NonNull String member) The value of the annotation as a Class.default <T> Class<T>[]
classValues
(@NonNull String annotation) The value of the annotation as a Class.default <T> Class<T>[]
classValues
(@NonNull String annotation, @NonNull String member) The value of the annotation as a Class.default AnnotationMetadata
Makes a copy of the annotation or returns this.default @NonNull OptionalDouble
doubleValue
(@NonNull Class<? extends Annotation> annotation) The value as anOptionalDouble
for the given annotation and member.default @NonNull OptionalDouble
doubleValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member) The value as anOptionalDouble
for the given annotation and member.default @NonNull OptionalDouble
doubleValue
(@NonNull String annotation, @NonNull String member) The value as anOptionalDouble
for the given annotation and member.enumValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member, Class<E> enumType) The value of the annotation as a Class.enumValue
(@NonNull Class<? extends Annotation> annotation, Class<E> enumType) The value of the annotation as a Class.The value of the annotation as a Class.The value of the given enum.default <E extends Enum<E>>
E[]enumValues
(@NonNull Class<? extends Annotation> annotation, @NonNull String member, Class<E> enumType) The enum values for the given annotation.default <E extends Enum<E>>
E[]enumValues
(@NonNull Class<? extends Annotation> annotation, Class<E> enumType) The enum values for the given annotation.default <E extends Enum<E>>
E[]The enum values for the given annotation.default <E extends Enum<E>>
E[]enumValues
(@NonNull String annotation, Class<E> enumType) The enum values for the given annotation.default <T extends Annotation>
@NonNull Optional<AnnotationValue<T>>findAnnotation
(@NonNull Class<T> annotationClass) Find anAnnotationValue
for the given annotation type.default <T extends Annotation>
@NonNull Optional<AnnotationValue<T>>findAnnotation
(@NonNull String annotation) Find anAnnotationValue
for the given annotation name.default <T extends Annotation>
@NonNull Optional<AnnotationValue<T>>findDeclaredAnnotation
(@NonNull Class<T> annotationClass) Get all of the values for the given annotation that are directly declared on the annotated element.default <T extends Annotation>
@NonNull Optional<AnnotationValue<T>>findDeclaredAnnotation
(@NonNull String annotation) Get all of the values for the given annotation that are directly declared on the annotated element.findRepeatableAnnotation
(Class<? extends Annotation> annotation) Find repeatable annotation container.findRepeatableAnnotation
(String annotation) Find repeatable annotation container.default <T extends Annotation>
@Nullable AnnotationValue<T>getAnnotation
(@NonNull Class<T> annotationClass) Find anAnnotationValue
for the given annotation name.default <T extends Annotation>
@Nullable AnnotationValue<T>getAnnotation
(@NonNull String annotation) Find anAnnotationValue
for the given annotation name.getAnnotationNameByStereotype
(@NonNull Class<? extends Annotation> stereotype) Find the first annotation name for the given stereotype.getAnnotationNameByStereotype
(String stereotype) Find the first annotation name for the given stereotype.All the annotation names this metadata declares.getAnnotationNamesByStereotype
(@NonNull Class<? extends Annotation> stereotype) Resolve all of the annotation names that feature the given stereotype.getAnnotationNamesByStereotype
(String stereotype) Resolve all of the annotation names that feature the given stereotype.default @NonNull Optional<Class<? extends Annotation>>
getAnnotationType
(@NonNull String name) Gets the type for a given annotation if it is present on the classpath.default @NonNull Optional<Class<? extends Annotation>>
getAnnotationType
(@NonNull String name, @NonNull ClassLoader classLoader) Gets the type for a given annotation if it is present on the classpath.default @NonNull Optional<Class<? extends Annotation>>
getAnnotationTypeByStereotype
(@NonNull Class<? extends Annotation> stereotype) Find the first annotation name for the given stereotype.default @NonNull Optional<Class<? extends Annotation>>
getAnnotationTypeByStereotype
(String stereotype) Find the first annotation name for the given stereotype.default @NonNull List<Class<? extends Annotation>>
getAnnotationTypesByStereotype
(@NonNull Class<? extends Annotation> stereotype) Resolve all of the annotation names that feature the given stereotype.default @NonNull List<Class<? extends Annotation>>
getAnnotationTypesByStereotype
(@NonNull Class<? extends Annotation> stereotype, @NonNull ClassLoader classLoader) Resolve all of the annotation names that feature the given stereotype.default @NonNull List<Class<? extends Annotation>>
getAnnotationTypesByStereotype
(@NonNull String stereotype) Resolve all of the annotation names that feature the given stereotype.default <T extends Annotation>
List<AnnotationValue<T>>getAnnotationValuesByName
(String annotationType) Gets all the annotation values by the given repeatable type name.default <T extends Annotation>
List<AnnotationValue<T>>getAnnotationValuesByStereotype
(String stereotype) Resolve all of the annotation values that feature the given stereotype.default <T extends Annotation>
@NonNull List<AnnotationValue<T>>getAnnotationValuesByType
(@NonNull Class<T> annotationType) Gets all the annotation values by the given repeatable type.default <T extends Annotation>
@Nullable AnnotationValue<T>getDeclaredAnnotation
(@NonNull Class<T> annotationClass) Find anAnnotationValue
for the given annotation name.default <T extends Annotation>
@Nullable AnnotationValue<T>getDeclaredAnnotation
(@NonNull String annotation) Get all of the values for the given annotation that are directly declared on the annotated element.getDeclaredAnnotationNameByStereotype
(String stereotype) Find the first annotation name for the given stereotype.All the declared annotation names this metadata declares.getDeclaredAnnotationNamesByStereotype
(String stereotype) Resolve all of the annotations names for the given stereotype that are declared annotations.default @NonNull Optional<Class<? extends Annotation>>
getDeclaredAnnotationTypeByStereotype
(@NonNull Class<? extends Annotation> stereotype) Find the first declared annotation name for the given stereotype.default @NonNull Optional<Class<? extends Annotation>>
getDeclaredAnnotationTypeByStereotype
(String stereotype) Find the first annotation name for the given stereotype.default <T extends Annotation>
List<AnnotationValue<T>>getDeclaredAnnotationValuesByName
(String annotationType) Gets only declared annotation values by the given repeatable type name.default <T extends Annotation>
@NonNull List<AnnotationValue<T>>getDeclaredAnnotationValuesByType
(@NonNull Class<T> annotationType) Gets only declared annotation values by the given repeatable type.default @NonNull AnnotationMetadata
Gets the declared metadata without inherited metdata.Returns the names of the annotations which are declared stereotypes.getDefaultValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Argument<T> requiredType) Return the default value for the given annotation member.getDefaultValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Class<T> requiredType) Return the default value for the given annotation member.getDefaultValue
(@NonNull String annotation, @NonNull String member, @NonNull Argument<T> requiredType) Return the default value for the given annotation member.Return the default value for the given annotation member.default @NonNull Map<CharSequence,
Object> getDefaultValues
(@NonNull String annotation) Return the default values for the given annotation name.Returns the names of the annotations which are stereotypes.default AnnotationMetadata
Unwraps possible delegate or provider.getValue
(@NonNull Class<? extends Annotation> annotation) Get the value of default "value" the given annotation.Get the value of default "value" the given annotation.Get the value of default "value" the given annotation.Get the value of the given annotation member.getValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Argument<T> requiredType) Get the value of the given annotation member.getValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member, @NonNull Class<T> requiredType) Get the value of the given annotation member.Get the value of default "value" the given annotation.Get the value of default "value" the given annotation.Get the value of default "value" the given annotation.Get the value of the given annotation member.Get the value of the given annotation member.Get the value of the given annotation member.default <T> @NonNull OptionalValues<T>
Get all of the values for the given annotation.default <T> @NonNull OptionalValues<T>
Get all of the values for the given annotation and type of the underlying values.default boolean
hasAnnotation
(@Nullable 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
(@Nullable 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
(@Nullable Class<? extends Annotation> stereotype) Checks whether this object has the given stereotype 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
(String annotation) Checks whether this object has the given annotation stereotype on the object itself and not inherited from a parentdefault boolean
Does the metadata contain any property expressions like${foo.bar}
.default boolean
hasSimpleAnnotation
(@Nullable String annotation) Checks whether the given annotation simple name (name without the package) is present in the annotations.default boolean
hasSimpleDeclaredAnnotation
(@Nullable String annotation) Checks whether the given annotation simple name (name without the package) is present in the declared annotations.default boolean
hasStereotype
(@Nullable Class<? extends Annotation> annotation) Checks whether this object has the given annotation stereotype on the object itself or inherited from a parentdefault boolean
hasStereotype
(Class<? extends Annotation>... annotations) Check whether any of the given stereotypes is present.default boolean
hasStereotype
(String annotation) Checks whether this object has the given annotation stereotype on the object itself or inherited from a parentdefault boolean
hasStereotype
(String[] annotations) Check whether any of the given stereotypes is present.default @NonNull OptionalInt
intValue
(@NonNull Class<? extends Annotation> annotation) The value as anOptionalInt
for the given annotation and member.default @NonNull OptionalInt
The value as anOptionalInt
for the given annotation and member.default @NonNull OptionalInt
The value as anOptionalInt
for the given annotation and member.default boolean
isAnnotationPresent
(@NonNull Class<? extends Annotation> annotationClass) Return whether an annotation is present.default boolean
isDeclaredAnnotationPresent
(@NonNull Class<? extends Annotation> annotationClass) Variation ofAnnotationSource.isAnnotationPresent(Class)
for declared annotations.default boolean
isEmpty()
Is the annotation metadata empty.default boolean
Returns whether the value of the given member is true.default boolean
Returns whether the value of the given member is true.default boolean
Returns whether the value of the given member is present.default boolean
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
Returns whether the value of the given member is true.default boolean
Returns whether the value of the given member is true.default OptionalLong
The value as anOptionalLong
for the given annotation and member.default @NonNull OptionalLong
The value as anOptionalLong
for the given annotation and member.stringValue
(@NonNull Class<? extends Annotation> annotation) The value as an optional string for the given annotation and member.stringValue
(@NonNull Class<? extends Annotation> annotation, @NonNull String member) The value as an optional string for the given annotation and member.stringValue
(@NonNull String annotation) The value as an optional string for the given annotation and member.stringValue
(@NonNull String annotation, @NonNull String member) The value as an optional string for the given annotation and member.stringValues
(@NonNull Class<? extends Annotation> annotation) The values as string array for the given annotation and member.stringValues
(@NonNull Class<? extends Annotation> annotation, @NonNull String member) The values as string array for the given annotation and member.stringValues
(@NonNull String annotation) The values as string array for the given annotation and member.stringValues
(@NonNull String annotation, @NonNull String member) The values as string array for the given annotation and member.default <T extends Annotation>
Tsynthesize
(@NonNull Class<T> annotationClass) Synthesizes a new annotation from the metadata for the given annotation type.default <T extends Annotation>
Tsynthesize
(@NonNull Class<T> annotationClass, @NonNull String sourceAnnotation) Synthesizes a new annotation for the given annotation type using the member values of the given source annotation.default @NonNull Annotation[]
Synthesizes a new annotations from the metadata.default <T extends Annotation>
@NonNull T[]synthesizeAnnotationsByType
(@NonNull Class<T> annotationClass) Synthesizes a new annotations from the metadata for the given type.default @NonNull Annotation[]
Synthesizes a new annotations from the metadata.default <T extends Annotation>
TsynthesizeDeclared
(@NonNull Class<T> annotationClass) Synthesizes a new annotation from the metadata for the given annotation type.default <T extends Annotation>
TsynthesizeDeclared
(@NonNull Class<T> annotationClass, @NonNull String sourceAnnotation) Synthesizes a new annotation declared for the given annotation type using the member values of the given source annotation.default <T extends Annotation>
@NonNull T[]synthesizeDeclaredAnnotationsByType
(@NonNull Class<T> annotationClass) Synthesizes a new annotations from the metadata for the given type.Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadata
-
Method Details
-
getStereotypeAnnotationNames
Description copied from interface:AnnotationMetadata
Returns the names of the annotations which are stereotypes.A stereotype is a meta-annotation (an annotation declared on another annotation).
- Specified by:
getStereotypeAnnotationNames
in interfaceAnnotationMetadata
- Returns:
- The names of the stereotype annotations
- See Also:
-
getDeclaredStereotypeAnnotationNames
Description copied from interface:AnnotationMetadata
Returns the names of the annotations which are declared stereotypes.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.
- Specified by:
getDeclaredStereotypeAnnotationNames
in interfaceAnnotationMetadata
- Returns:
- The names of the stereotype annotations
- See Also:
-
getDeclaredAnnotationValuesByName
default <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
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-
getAnnotationValuesByName
default <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
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-
getAnnotationValuesByStereotype
default <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
- Type Parameters:
T
- The annotation type- Parameters:
stereotype
- The annotation names- Returns:
- A set of annotation names
-
getDeclaredMetadata
Description copied from interface:AnnotationMetadata
Gets the declared metadata without inherited metdata.- Specified by:
getDeclaredMetadata
in interfaceAnnotationMetadata
- Returns:
- The declared metadata
-
hasSimpleAnnotation
Description copied from interface:AnnotationMetadata
Checks whether the given annotation simple name (name without the package) is present in the annotations.- Specified by:
hasSimpleAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
hasPropertyExpressions
default boolean hasPropertyExpressions()Description copied from interface:AnnotationMetadata
Does the metadata contain any property expressions like${foo.bar}
. Note this by default returnstrue
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.- Specified by:
hasPropertyExpressions
in interfaceAnnotationMetadata
- Returns:
- True if property expressions are present
-
hasSimpleDeclaredAnnotation
Description copied from interface:AnnotationMetadata
Checks whether the given annotation simple name (name without the package) is present in the declared annotations.- Specified by:
hasSimpleDeclaredAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
enumValues
Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An array of enum values
-
enumValues
default <E extends Enum<E>> E[] enumValues(@NonNull @NonNull String annotation, @NonNull @NonNull String member, Class<E> enumType) Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationmember
- The annotation memberenumType
- The enum type- Returns:
- An array of enum values
-
enumValues
default <E extends Enum<E>> E[] enumValues(@NonNull @NonNull Class<? extends Annotation> annotation, Class<E> enumType) Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An array of enum values
-
enumValues
default <E extends Enum<E>> E[] enumValues(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member, Class<E> enumType) Description copied from interface:AnnotationMetadata
The enum values for the given annotation.- Specified by:
enumValues
in interfaceAnnotationMetadata
- 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
- Type Parameters:
T
- The type of the class- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValues
default <T> Class<T>[] classValues(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValues
in interfaceAnnotationMetadata
- 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
- Type Parameters:
T
- The type of the class- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValues
default <T> Class<T>[] classValues(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValues
in interfaceAnnotationMetadata
- Type Parameters:
T
- The type of the class- Parameters:
annotation
- The annotationmember
- The annotation member- Returns:
- An
Optional
class
-
enumValue
default <E extends Enum<E>> Optional<E> enumValue(@NonNull @NonNull String annotation, Class<E> enumType) Description copied from interface:AnnotationMetadata
The value of the given enum.- Specified by:
enumValue
in interfaceAnnotationMetadata
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An
Optional
enum value
-
enumValue
default <E extends Enum<E>> Optional<E> enumValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member, Class<E> enumType) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
enumValue
in interfaceAnnotationMetadata
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationmember
- The annotation memberenumType
- The enum type- Returns:
- An
Optional
class
-
enumValue
default <E extends Enum<E>> Optional<E> enumValue(@NonNull @NonNull 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
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationenumType
- The enum type- Returns:
- An
Optional
class
-
enumValue
default <E extends Enum<E>> Optional<E> enumValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member, Class<E> enumType) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
enumValue
in interfaceAnnotationMetadata
- Type Parameters:
E
- The enum type- Parameters:
annotation
- The annotationmember
- The annotation memberenumType
- The enum type- Returns:
- An
Optional
class
-
longValue
default OptionalLong longValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as anOptionalLong
for the given annotation and member.- Specified by:
longValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalLong
value
-
booleanValue
default Optional<Boolean> booleanValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as an optional boolean for the given annotation and member.- Specified by:
booleanValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
booleanValue
default Optional<Boolean> booleanValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as an optional boolean for the given annotation and member.- Specified by:
booleanValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
booleanValue
@NonNull default @NonNull Optional<Boolean> booleanValue(@NonNull @NonNull Class<? extends Annotation> annotation) Description copied from interface:AnnotationMetadata
The value as an optional boolean for the given annotation and member.- Specified by:
booleanValue
in interfaceAnnotationMetadata
- 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
- Parameters:
annotation
- The annotation- Returns:
- The string value if it is present
-
stringValues
@NonNull default @NonNull String[] stringValues(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The values as string array for the given annotation and member.- Specified by:
stringValues
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string values if it is present
-
stringValues
@NonNull default @NonNull String[] stringValues(@NonNull @NonNull Class<? extends Annotation> annotation) Description copied from interface:AnnotationMetadata
The values as string array for the given annotation and member.- Specified by:
stringValues
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- The string values if it is present
-
stringValues
@NonNull default @NonNull String[] stringValues(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The values as string array for the given annotation and member.- Specified by:
stringValues
in interfaceAnnotationMetadata
- 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
- Parameters:
annotation
- The annotation- Returns:
- The string values if it is present
-
intValue
@NonNull default @NonNull OptionalInt intValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as anOptionalInt
for the given annotation and member.- Specified by:
intValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalInt
value
-
intValue
@NonNull default @NonNull OptionalInt intValue(@NonNull @NonNull Class<? extends Annotation> annotation) Description copied from interface:AnnotationMetadata
The value as anOptionalInt
for the given annotation and member.- Specified by:
intValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- THe
OptionalInt
value
-
stringValue
@NonNull default @NonNull Optional<String> stringValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as an optional string for the given annotation and member.- Specified by:
stringValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
stringValue
@NonNull default @NonNull Optional<String> stringValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as an optional string for the given annotation and member.- Specified by:
stringValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- The string value if it is present
-
stringValue
@NonNull default @NonNull Optional<String> stringValue(@NonNull @NonNull Class<? extends Annotation> annotation) Description copied from interface:AnnotationMetadata
The value as an optional string for the given annotation and member.- Specified by:
stringValue
in interfaceAnnotationMetadata
- 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
- Parameters:
annotation
- The annotation- Returns:
- The string value if it is present
-
doubleValue
@NonNull default @NonNull OptionalDouble doubleValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as anOptionalDouble
for the given annotation and member.- Specified by:
doubleValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalDouble
value
-
doubleValue
@NonNull default @NonNull OptionalDouble doubleValue(@NonNull @NonNull Class<? extends Annotation> annotation) Description copied from interface:AnnotationMetadata
The value as anOptionalDouble
for the given annotation and member.- Specified by:
doubleValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- THe
OptionalDouble
value
-
getDefaultValues
@NonNull default @NonNull Map<CharSequence,Object> getDefaultValues(@NonNull @NonNull String annotation) Description copied from interface:AnnotationMetadata
Return the default values for the given annotation name.- Specified by:
getDefaultValues
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation name- Returns:
- The default values
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull String annotation, @NonNull @NonNull Argument<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation classrequiredType
- requiredType- Returns:
- An
Optional
of the value
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull Argument<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation classrequiredType
- requiredType- Returns:
- An
Optional
of the value
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member, @NonNull @NonNull Argument<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getDefaultValue
@NonNull default <T> @NonNull Optional<T> getDefaultValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member, @NonNull @NonNull Argument<T> requiredType) Description copied from interface:AnnotationMetadata
Return the default value for the given annotation member.- Specified by:
getDefaultValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The required generic type- Parameters:
annotation
- The annotationmember
- The memberrequiredType
- The required type- Returns:
- An optional value
-
getDefaultValue
@NonNull default <T> @NonNull Optional<T> getDefaultValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member, @NonNull @NonNull Argument<T> requiredType) Description copied from interface:AnnotationMetadata
Return the default value for the given annotation member.- Specified by:
getDefaultValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The required generic type- Parameters:
annotation
- The annotationmember
- The memberrequiredType
- The required type- Returns:
- An optional value
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member, @NonNull @NonNull Argument<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
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 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
-
synthesizeAnnotationsByType
@NonNull default <T extends Annotation> @NonNull T[] synthesizeAnnotationsByType(@NonNull @NonNull Class<T> annotationClass) 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 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
-
synthesizeDeclaredAnnotationsByType
@NonNull default <T extends Annotation> @NonNull T[] synthesizeDeclaredAnnotationsByType(@NonNull @NonNull Class<T> annotationClass) 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 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
-
getAnnotation
@Nullable default <T extends Annotation> @Nullable AnnotationValue<T> getAnnotation(@NonNull @NonNull String annotation) Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- Specified by:
getAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotation
- The annotation name- Returns:
- A
AnnotationValue
instance or null
-
getAnnotation
@Nullable default <T extends Annotation> @Nullable AnnotationValue<T> getAnnotation(@NonNull @NonNull Class<T> annotationClass) Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- Specified by:
getAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation name- Returns:
- A
AnnotationValue
instance or null
-
getDeclaredAnnotation
@Nullable default <T extends Annotation> @Nullable AnnotationValue<T> getDeclaredAnnotation(@NonNull @NonNull 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:
getDeclaredAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotation
- The annotation name- Returns:
- A
AnnotationValue
instance
-
findDeclaredAnnotation
@NonNull default <T extends Annotation> @NonNull Optional<AnnotationValue<T>> findDeclaredAnnotation(@NonNull @NonNull 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 interfaceAnnotationMetadataProvider
- Specified by:
findDeclaredAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation name- Returns:
- A
AnnotationValue
instance
-
getDeclaredAnnotation
@Nullable default <T extends Annotation> @Nullable AnnotationValue<T> getDeclaredAnnotation(@NonNull @NonNull Class<T> annotationClass) Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- Specified by:
getDeclaredAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation name- Returns:
- A
AnnotationValue
instance or null
-
isAnnotationPresent
Description copied from interface:AnnotationSource
Return whether an annotation is present.- Specified by:
isAnnotationPresent
in interfaceAnnotationMetadata
- Specified by:
isAnnotationPresent
in interfaceAnnotationMetadataProvider
- Specified by:
isAnnotationPresent
in interfaceAnnotationSource
- Parameters:
annotationClass
- The annotation class- Returns:
- True if it is
- See Also:
-
isDeclaredAnnotationPresent
default boolean isDeclaredAnnotationPresent(@NonNull @NonNull Class<? extends Annotation> annotationClass) Description copied from interface:AnnotationSource
Variation ofAnnotationSource.isAnnotationPresent(Class)
for declared annotations.- Specified by:
isDeclaredAnnotationPresent
in interfaceAnnotationMetadata
- Specified by:
isDeclaredAnnotationPresent
in interfaceAnnotationMetadataProvider
- Specified by:
isDeclaredAnnotationPresent
in interfaceAnnotationSource
- Parameters:
annotationClass
- The annotation class- Returns:
- True if it is
- See Also:
-
getDefaultValue
@NonNull default <T> @NonNull Optional<T> getDefaultValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member, @NonNull @NonNull Class<T> requiredType) Description copied from interface:AnnotationMetadata
Return the default value for the given annotation member.- Specified by:
getDefaultValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The required generic type- Parameters:
annotation
- The annotationmember
- The memberrequiredType
- The required type- Returns:
- An optional value
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member, @NonNull @NonNull Class<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getAnnotationNameByStereotype
Description copied from interface:AnnotationMetadata
Find the first annotation name for the given stereotype.- Specified by:
getAnnotationNameByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The annotation name
-
getDeclaredAnnotationNameByStereotype
Description copied from interface:AnnotationMetadata
Find the first annotation name for the given stereotype.- Specified by:
getDeclaredAnnotationNameByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The annotation name
-
getAnnotationTypeByStereotype
@NonNull default @NonNull Optional<Class<? extends Annotation>> getAnnotationTypeByStereotype(@NonNull @NonNull Class<? extends Annotation> stereotype) Description copied from interface:AnnotationMetadata
Find the first annotation name for the given stereotype.- Specified by:
getAnnotationTypeByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The annotation name
-
getDeclaredAnnotationTypeByStereotype
@NonNull default @NonNull Optional<Class<? extends Annotation>> getDeclaredAnnotationTypeByStereotype(@NonNull @NonNull Class<? extends Annotation> stereotype) Description copied from interface:AnnotationMetadata
Find the first declared annotation name for the given stereotype.- Specified by:
getDeclaredAnnotationTypeByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The annotation name
-
getDeclaredAnnotationTypeByStereotype
@NonNull default @NonNull Optional<Class<? extends Annotation>> getDeclaredAnnotationTypeByStereotype(String stereotype) Description copied from interface:AnnotationMetadata
Find the first annotation name for the given stereotype.- Specified by:
getDeclaredAnnotationTypeByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The annotation name
-
getAnnotationTypeByStereotype
@NonNull default @NonNull Optional<Class<? extends Annotation>> getAnnotationTypeByStereotype(String stereotype) Description copied from interface:AnnotationMetadata
Find the first annotation name for the given stereotype.- Specified by:
getAnnotationTypeByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The annotation name
-
getAnnotationNameByStereotype
@NonNull default @NonNull Optional<String> getAnnotationNameByStereotype(@NonNull @NonNull Class<? extends Annotation> stereotype) Description copied from interface:AnnotationMetadata
Find the first annotation name for the given stereotype.- Specified by:
getAnnotationNameByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The annotation name
-
getValues
@NonNull default <T> @NonNull OptionalValues<T> getValues(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull Class<T> valueType) Description copied from interface:AnnotationMetadata
Get all of the values for the given annotation.- Specified by:
getValues
in interfaceAnnotationMetadata
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation namevalueType
- valueType- Returns:
- The
OptionalValues
-
getAnnotationNamesByStereotype
@NonNull default @NonNull List<String> getAnnotationNamesByStereotype(@NonNull @NonNull Class<? extends Annotation> stereotype) Description copied from interface:AnnotationMetadata
Resolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationNamesByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The annotation names- Returns:
- A set of annotation names
-
getAnnotationTypesByStereotype
@NonNull default @NonNull List<Class<? extends Annotation>> getAnnotationTypesByStereotype(@NonNull @NonNull Class<? extends Annotation> stereotype) Description copied from interface:AnnotationMetadata
Resolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationTypesByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The annotation names- Returns:
- A set of annotation names
-
getAnnotationTypesByStereotype
@NonNull default @NonNull List<Class<? extends Annotation>> getAnnotationTypesByStereotype(@NonNull @NonNull String stereotype) Description copied from interface:AnnotationMetadata
Resolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationTypesByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The annotation names- Returns:
- A set of annotation names
-
getAnnotationTypesByStereotype
@NonNull default @NonNull List<Class<? extends Annotation>> getAnnotationTypesByStereotype(@NonNull @NonNull Class<? extends Annotation> stereotype, @NonNull @NonNull ClassLoader classLoader) Description copied from interface:AnnotationMetadata
Resolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationTypesByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The annotation namesclassLoader
- The classloader to load annotation type- Returns:
- A set of annotation names
-
findAnnotation
@NonNull default <T extends Annotation> @NonNull Optional<AnnotationValue<T>> findAnnotation(@NonNull @NonNull Class<T> annotationClass) Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation type.- Specified by:
findAnnotation
in interfaceAnnotationMetadata
- Specified by:
findAnnotation
in interfaceAnnotationMetadataProvider
- Specified by:
findAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotationClass
- The annotation- Returns:
- A
AnnotationValue
instance
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member, @NonNull @NonNull Class<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classmember
- The annotation memberrequiredType
- The required type- Returns:
- An
Optional
of the value
-
longValue
@NonNull default @NonNull OptionalLong longValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as anOptionalLong
for the given annotation and member.- Specified by:
longValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalLong
value
-
classValue
Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValue
@NonNull default @NonNull Optional<Class> classValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The annotation member- Returns:
- An
Optional
class
-
classValue
@NonNull default @NonNull Optional<Class> classValue(@NonNull @NonNull Class<? extends Annotation> annotation) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- An
Optional
class
-
classValue
@NonNull default @NonNull Optional<Class> classValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value of the annotation as a Class.- Specified by:
classValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The annotation member- Returns:
- An
Optional
class
-
intValue
@NonNull default @NonNull OptionalInt intValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as anOptionalInt
for the given annotation and member.- Specified by:
intValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalInt
value
-
doubleValue
@NonNull default @NonNull OptionalDouble doubleValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
The value as anOptionalDouble
for the given annotation and member.- Specified by:
doubleValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotationmember
- The member- Returns:
- THe
OptionalDouble
value
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull String annotation, @NonNull @NonNull Class<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The value- Parameters:
annotation
- The annotation classrequiredType
- The required type- Returns:
- An
Optional
of the value
-
getValue
@NonNull default @NonNull Optional<Object> getValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- An
Optional
of the value
-
getValue
@NonNull default @NonNull Optional<Object> getValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
Get the value of the given annotation member.- Specified by:
getValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- An
Optional
of the value
-
isTrue
Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is true.- Specified by:
isTrue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
isTrue
default boolean isTrue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is true.- Specified by:
isTrue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
isPresent
Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is present.- Specified by:
isPresent
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
isPresent
default boolean isPresent(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is present.- Specified by:
isPresent
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
isFalse
default boolean isFalse(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull String member) Description copied from interface:AnnotationMetadata
Returns whether the value of the given member is true.- Specified by:
isFalse
in interfaceAnnotationMetadata
- 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
- Parameters:
annotation
- The annotation classmember
- The annotation member- Returns:
- True if the value is true
-
getValue
Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation class- Returns:
- An
Optional
of the value
-
getValue
@NonNull default @NonNull Optional<Object> getValue(@NonNull @NonNull Class<? extends Annotation> annotation) Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation class- Returns:
- An
Optional
of the value
-
getValue
@NonNull default <T> @NonNull Optional<T> getValue(@NonNull @NonNull Class<? extends Annotation> annotation, @NonNull @NonNull Class<T> requiredType) Description copied from interface:AnnotationMetadata
Get the value of default "value" the given annotation.- Specified by:
getValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation classrequiredType
- requiredType- Returns:
- An
Optional
of the value
-
getAnnotationType
@NonNull default @NonNull Optional<Class<? extends Annotation>> getAnnotationType(@NonNull @NonNull String name) Description copied from interface:AnnotationMetadata
Gets the type for a given annotation if it is present on the classpath. Subclasses can potentially override to provide optimized loading.- Specified by:
getAnnotationType
in interfaceAnnotationMetadata
- Parameters:
name
- The type name- Returns:
- The type if present
-
getAnnotationType
@NonNull default @NonNull Optional<Class<? extends Annotation>> getAnnotationType(@NonNull @NonNull String name, @NonNull @NonNull ClassLoader classLoader) Description copied from interface:AnnotationMetadata
Gets the type for a given annotation if it is present on the classpath. Subclasses can potentially override to provide optimized loading.- Specified by:
getAnnotationType
in interfaceAnnotationMetadata
- Parameters:
name
- The type nameclassLoader
- The ClassLoader to load the type- Returns:
- The type if present
-
hasAnnotation
Description copied from interface:AnnotationMetadata
Checks whether this object has the given annotation on the object itself or inherited from a parent.- Specified by:
hasAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
hasStereotype
Description copied from interface:AnnotationMetadata
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
- Specified by:
hasStereotype
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
hasStereotype
Description copied from interface:AnnotationMetadata
Check whether any of the given stereotypes is present.- Specified by:
hasStereotype
in interfaceAnnotationMetadata
- Parameters:
annotations
- The annotations- Returns:
- True if any of the given stereotypes are present
-
hasStereotype
Description copied from interface:AnnotationMetadata
Check whether any of the given stereotypes is present.- Specified by:
hasStereotype
in interfaceAnnotationMetadata
- Parameters:
annotations
- The annotations- Returns:
- True if any of the given stereotypes are present
-
hasDeclaredAnnotation
Description copied from interface:AnnotationMetadata
Checks whether this object has the given annotation directly declared on the object.- Specified by:
hasDeclaredAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
hasDeclaredStereotype
Description copied from interface:AnnotationMetadata
Checks whether this object has the given stereotype directly declared on the object.- Specified by:
hasDeclaredStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The annotation- Returns:
- True if the annotation is present
-
hasDeclaredStereotype
Description copied from interface:AnnotationMetadata
Checks whether this object has any of the given stereotype directly declared on the object.- Specified by:
hasDeclaredStereotype
in interfaceAnnotationMetadata
- Parameters:
annotations
- The annotations- Returns:
- True if any of the given stereotypes are present
-
isEmpty
default boolean isEmpty()Description copied from interface:AnnotationMetadata
Is the annotation metadata empty.- Specified by:
isEmpty
in interfaceAnnotationMetadata
- Returns:
- True if it is
-
hasDeclaredAnnotation
Description copied from interface:AnnotationMetadata
Checks whether this object has the given annotation directly declared on the object.- Specified by:
hasDeclaredAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
getAnnotationNames
Description copied from interface:AnnotationMetadata
All the annotation names this metadata declares.- Specified by:
getAnnotationNames
in interfaceAnnotationMetadata
- Returns:
- All the annotation names this metadata declares
-
getDeclaredAnnotationNames
Description copied from interface:AnnotationMetadata
All the declared annotation names this metadata declares.- Specified by:
getDeclaredAnnotationNames
in interfaceAnnotationMetadata
- Returns:
- All the declared annotation names this metadata declares
-
hasAnnotation
Description copied from interface:AnnotationMetadata
Checks whether this object has the given annotation on the object itself or inherited from a parent.- Specified by:
hasAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
hasStereotype
Description copied from interface:AnnotationMetadata
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
- Specified by:
hasStereotype
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
hasDeclaredStereotype
Description copied from interface:AnnotationMetadata
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
- Specified by:
hasDeclaredStereotype
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- True if the annotation is present
-
getAnnotationNamesByStereotype
Description copied from interface:AnnotationMetadata
Resolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationNamesByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The annotation names- Returns:
- A set of annotation names
-
getDeclaredAnnotationNamesByStereotype
Description copied from interface:AnnotationMetadata
Resolve all of the annotations names for the given stereotype that are declared annotations.- Specified by:
getDeclaredAnnotationNamesByStereotype
in interfaceAnnotationMetadata
- Parameters:
stereotype
- The stereotype- Returns:
- The declared annotations
-
findAnnotation
@NonNull default <T extends Annotation> @NonNull Optional<AnnotationValue<T>> findAnnotation(@NonNull @NonNull String annotation) Description copied from interface:AnnotationSource
Find anAnnotationValue
for the given annotation name.- 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
-
getValues
@NonNull default <T> @NonNull OptionalValues<T> getValues(@NonNull @NonNull String annotation, @NonNull @NonNull Class<T> valueType) 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
- Type Parameters:
T
- Generic type- Parameters:
annotation
- The annotation namevalueType
- valueType- Returns:
- The
OptionalValues
-
findDeclaredAnnotation
@NonNull default <T extends Annotation> @NonNull Optional<AnnotationValue<T>> findDeclaredAnnotation(@NonNull @NonNull 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 interfaceAnnotationMetadataProvider
- Specified by:
findDeclaredAnnotation
in interfaceAnnotationSource
- Type Parameters:
T
- The annotation type- Parameters:
annotation
- The annotation name- Returns:
- A
AnnotationValue
instance
-
getDefaultValue
@NonNull default <T> @NonNull Optional<T> getDefaultValue(@NonNull @NonNull String annotation, @NonNull @NonNull String member, @NonNull @NonNull Class<T> requiredType) Description copied from interface:AnnotationMetadata
Return the default value for the given annotation member.- Specified by:
getDefaultValue
in interfaceAnnotationMetadata
- Type Parameters:
T
- The required generic type- Parameters:
annotation
- The annotationmember
- The memberrequiredType
- The required type- Returns:
- An optional value
-
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 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
@Nullable default <T extends Annotation> T synthesize(@NonNull @NonNull Class<T> annotationClass, @NonNull @NonNull String sourceAnnotation) 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 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
@Nullable default <T extends Annotation> T synthesizeDeclared(@NonNull @NonNull Class<T> annotationClass, @NonNull @NonNull 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 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
-
synthesizeAll
Description copied from interface:AnnotationSource
Synthesizes a new annotations from the metadata. 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:
synthesizeAll
in interfaceAnnotationMetadataProvider
- Specified by:
synthesizeAll
in interfaceAnnotationSource
- Returns:
- All the annotations
-
synthesizeDeclared
Description copied from interface:AnnotationSource
Synthesizes a new annotations from the metadata. 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:
synthesizeDeclared
in interfaceAnnotationMetadataProvider
- Specified by:
synthesizeDeclared
in interfaceAnnotationSource
- Returns:
- All declared annotations
-
getAnnotationValuesByType
@NonNull default <T extends Annotation> @NonNull List<AnnotationValue<T>> getAnnotationValuesByType(@NonNull @NonNull Class<T> annotationType) Description copied from interface:AnnotationMetadata
Gets all the annotation values by the given repeatable type.- Specified by:
getAnnotationValuesByType
in interfaceAnnotationMetadata
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-
getDeclaredAnnotationValuesByType
@NonNull default <T extends Annotation> @NonNull List<AnnotationValue<T>> getDeclaredAnnotationValuesByType(@NonNull @NonNull Class<T> annotationType) Description copied from interface:AnnotationMetadata
Gets only declared annotation values by the given repeatable type.- Specified by:
getDeclaredAnnotationValuesByType
in interfaceAnnotationMetadata
- Type Parameters:
T
- The annotation type- Parameters:
annotationType
- The annotation type- Returns:
- A list of values
-
isRepeatableAnnotation
Description copied from interface:AnnotationMetadata
Is repeatable annotation?- Specified by:
isRepeatableAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- true if repeatable
-
isRepeatableAnnotation
Description copied from interface:AnnotationMetadata
Is repeatable annotation?- Specified by:
isRepeatableAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- true if repeatable
-
findRepeatableAnnotation
Description copied from interface:AnnotationMetadata
Find repeatable annotation container.- Specified by:
findRepeatableAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- optional repeatable annotation container
-
findRepeatableAnnotation
Description copied from interface:AnnotationMetadata
Find repeatable annotation container.- Specified by:
findRepeatableAnnotation
in interfaceAnnotationMetadata
- Parameters:
annotation
- The annotation- Returns:
- optional repeatable annotation container
-
copyAnnotationMetadata
Description copied from interface:AnnotationMetadata
Makes a copy of the annotation or returns this.- Specified by:
copyAnnotationMetadata
in interfaceAnnotationMetadata
- Returns:
- the copy
-
getTargetAnnotationMetadata
Description copied from interface:AnnotationSource
Unwraps possible delegate or provider.- Specified by:
getTargetAnnotationMetadata
in interfaceAnnotationMetadata
- Specified by:
getTargetAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Specified by:
getTargetAnnotationMetadata
in interfaceAnnotationSource
- Returns:
- unwrapped
- See Also:
-