Interface AnnotationMetadataDelegate
-
- All Superinterfaces:
AnnotationMetadata,AnnotationMetadataProvider,AnnotationSource
- All Known Subinterfaces:
BeanIntrospection<T>,BeanProperty<B,T>,UnsafeBeanProperty<B,T>
- All Known Implementing Classes:
AbstractBeanIntrospection,AbstractBeanProperty
public interface AnnotationMetadataDelegate extends AnnotationMetadataProvider, AnnotationMetadata
An interface that can be implemented by other classes that delegate the resolution of theAnnotationMetadatato theAnnotationMetadataProvider.getAnnotationMetadata()method.- Since:
- 1.0
-
-
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
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Optional<java.lang.Boolean>booleanValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)The value as an optional boolean for the given annotation and member.default java.util.Optional<java.lang.Boolean>booleanValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The value as an optional boolean for the given annotation and member.default java.util.Optional<java.lang.Boolean>booleanValue(java.lang.String annotation)The value as an optional boolean for the given annotation and member.default java.util.Optional<java.lang.Boolean>booleanValue(java.lang.String annotation, java.lang.String member)The value as an optional boolean for the given annotation and member.default java.util.Optional<java.lang.Class>classValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)The value of the annotation as a Class.default java.util.Optional<java.lang.Class>classValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The value of the annotation as a Class.default java.util.Optional<java.lang.Class>classValue(java.lang.String annotation)The value of the annotation as a Class.default java.util.Optional<java.lang.Class>classValue(java.lang.String annotation, java.lang.String member)The value of the annotation as a Class.default <T> java.lang.Class<T>[]classValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)The value of the annotation as a Class.default <T> java.lang.Class<T>[]classValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The value of the annotation as a Class.default <T> java.lang.Class<T>[]classValues(java.lang.String annotation)The value of the annotation as a Class.default <T> java.lang.Class<T>[]classValues(java.lang.String annotation, java.lang.String member)The value of the annotation as a Class.default java.util.OptionalDoubledoubleValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)The value as anOptionalDoublefor the given annotation and member.default java.util.OptionalDoubledoubleValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The value as anOptionalDoublefor the given annotation and member.default java.util.OptionalDoubledoubleValue(java.lang.String annotation, java.lang.String member)The value as anOptionalDoublefor the given annotation and member.default <E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)The value of the annotation as a Class.default <E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<E> enumType)The value of the annotation as a Class.default <E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.String annotation, java.lang.Class<E> enumType)The value of the given enum.default <E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.String annotation, java.lang.String member, java.lang.Class<E> enumType)The value of the annotation as a Class.default <E extends java.lang.Enum>
E[]enumValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)The enum values for the given annotation.default <E extends java.lang.Enum>
E[]enumValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<E> enumType)The enum values for the given annotation.default <E extends java.lang.Enum>
E[]enumValues(java.lang.String annotation, java.lang.Class<E> enumType)The enum values for the given annotation.default <E extends java.lang.Enum>
E[]enumValues(java.lang.String annotation, java.lang.String member, java.lang.Class<E> enumType)The enum values for the given annotation.default <T extends java.lang.annotation.Annotation>
java.util.Optional<AnnotationValue<T>>findAnnotation(java.lang.Class<T> annotationClass)Find anAnnotationValuefor the given annotation type.default <T extends java.lang.annotation.Annotation>
java.util.Optional<AnnotationValue<T>>findAnnotation(java.lang.String annotation)Find anAnnotationValuefor the given annotation name.default <T extends java.lang.annotation.Annotation>
java.util.Optional<AnnotationValue<T>>findDeclaredAnnotation(java.lang.Class<T> annotationClass)Get all of the values for the given annotation that are directly declared on the annotated element.default <T extends java.lang.annotation.Annotation>
java.util.Optional<AnnotationValue<T>>findDeclaredAnnotation(java.lang.String annotation)Get all of the values for the given annotation that are directly declared on the annotated element.default java.util.Optional<java.lang.String>findRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)Find repeatable annotation container.default java.util.Optional<java.lang.String>findRepeatableAnnotation(java.lang.String annotation)Find repeatable annotation container.default <T extends java.lang.annotation.Annotation>
AnnotationValue<T>getAnnotation(java.lang.Class<T> annotationClass)Find anAnnotationValuefor the given annotation name.default <T extends java.lang.annotation.Annotation>
AnnotationValue<T>getAnnotation(java.lang.String annotation)Find anAnnotationValuefor the given annotation name.default java.util.Optional<java.lang.String>getAnnotationNameByStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)Find the first annotation name for the given stereotype.default java.util.Optional<java.lang.String>getAnnotationNameByStereotype(java.lang.String stereotype)Find the first annotation name for the given stereotype.default java.util.Set<java.lang.String>getAnnotationNames()All the annotation names this metadata declares.default java.util.List<java.lang.String>getAnnotationNamesByStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)Resolve all of the annotation names that feature the given stereotype.default java.util.List<java.lang.String>getAnnotationNamesByStereotype(java.lang.String stereotype)Resolve all of the annotation names that feature the given stereotype.default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationType(java.lang.String name)Gets the type for a given annotation if it is present on the classpath.default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationType(java.lang.String name, java.lang.ClassLoader classLoader)Gets the type for a given annotation if it is present on the classpath.default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationTypeByStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)Find the first annotation name for the given stereotype.default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationTypeByStereotype(java.lang.String stereotype)Find the first annotation name for the given stereotype.default java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationTypesByStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)Resolve all of the annotation names that feature the given stereotype.default java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationTypesByStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype, java.lang.ClassLoader classLoader)Resolve all of the annotation names that feature the given stereotype.default java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationTypesByStereotype(java.lang.String stereotype)Resolve all of the annotation names that feature the given stereotype.default <T extends java.lang.annotation.Annotation>
java.util.List<AnnotationValue<T>>getAnnotationValuesByType(java.lang.Class<T> annotationType)Gets all the annotation values by the given repeatable type.default <T extends java.lang.annotation.Annotation>
AnnotationValue<T>getDeclaredAnnotation(java.lang.Class<T> annotationClass)Find anAnnotationValuefor the given annotation name.default <T extends java.lang.annotation.Annotation>
AnnotationValue<T>getDeclaredAnnotation(java.lang.String annotation)Get all of the values for the given annotation that are directly declared on the annotated element.default java.util.Optional<java.lang.String>getDeclaredAnnotationNameByStereotype(java.lang.String stereotype)Find the first annotation name for the given stereotype.default java.util.Set<java.lang.String>getDeclaredAnnotationNames()All the declared annotation names this metadata declares.default java.util.List<java.lang.String>getDeclaredAnnotationNamesByStereotype(java.lang.String stereotype)Resolve all of the annotations names for the given stereotype that are declared annotations.default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getDeclaredAnnotationTypeByStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)Find the first declared annotation name for the given stereotype.default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getDeclaredAnnotationTypeByStereotype(java.lang.String stereotype)Find the first annotation name for the given stereotype.default <T extends java.lang.annotation.Annotation>
java.util.List<AnnotationValue<T>>getDeclaredAnnotationValuesByType(java.lang.Class<T> annotationType)Gets only declared annotation values by the given repeatable type.default AnnotationMetadatagetDeclaredMetadata()Gets the declared metadata without inherited metdata.default java.util.Set<java.lang.String>getDeclaredStereotypeAnnotationNames()Returns the names of the annotations which are declared stereotypes.default <T> java.util.Optional<T>getDefaultValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, Argument<T> requiredType)Return the default value for the given annotation member.default <T> java.util.Optional<T>getDefaultValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<T> requiredType)Return the default value for the given annotation member.default <T> java.util.Optional<T>getDefaultValue(java.lang.String annotation, java.lang.String member, Argument<T> requiredType)Return the default value for the given annotation member.default <T> java.util.Optional<T>getDefaultValue(java.lang.String annotation, java.lang.String member, java.lang.Class<T> requiredType)Return the default value for the given annotation member.default java.util.Map<java.lang.String,java.lang.Object>getDefaultValues(java.lang.String annotation)Return the default values for the given annotation name.default java.util.Set<java.lang.String>getStereotypeAnnotationNames()Returns the names of the annotations which are stereotypes.default java.util.Optional<java.lang.Object>getValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)Get the value of default "value" the given annotation.default <T> java.util.Optional<T>getValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, Argument<T> requiredType)Get the value of default "value" the given annotation.default <T> java.util.Optional<T>getValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<T> requiredType)Get the value of default "value" the given annotation.default java.util.Optional<java.lang.Object>getValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)Get the value of the given annotation member.default <T> java.util.Optional<T>getValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, Argument<T> requiredType)Get the value of the given annotation member.default <T> java.util.Optional<T>getValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<T> requiredType)Get the value of the given annotation member.default java.util.Optional<java.lang.Object>getValue(java.lang.String annotation)Get the value of default "value" the given annotation.default <T> java.util.Optional<T>getValue(java.lang.String annotation, Argument<T> requiredType)Get the value of default "value" the given annotation.default <T> java.util.Optional<T>getValue(java.lang.String annotation, java.lang.Class<T> requiredType)Get the value of default "value" the given annotation.default java.util.Optional<java.lang.Object>getValue(java.lang.String annotation, java.lang.String member)Get the value of the given annotation member.default <T> java.util.Optional<T>getValue(java.lang.String annotation, java.lang.String member, Argument<T> requiredType)Get the value of the given annotation member.default <T> java.util.Optional<T>getValue(java.lang.String annotation, java.lang.String member, java.lang.Class<T> requiredType)Get the value of the given annotation member.default <T> OptionalValues<T>getValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<T> valueType)Get all of the values for the given annotation.default <T> OptionalValues<T>getValues(java.lang.String annotation, java.lang.Class<T> valueType)Get all of the values for the given annotation and type of the underlying values.default booleanhasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)Checks whether this object has the given annotation on the object itself or inherited from a parent.default booleanhasAnnotation(java.lang.String annotation)Checks whether this object has the given annotation on the object itself or inherited from a parent.default booleanhasDeclaredAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)Checks whether this object has the given annotation directly declared on the object.default booleanhasDeclaredAnnotation(java.lang.String annotation)Checks whether this object has the given annotation directly declared on the object.default booleanhasDeclaredStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)Checks whether this object has the given stereotype directly declared on the object.default booleanhasDeclaredStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)Checks whether this object has any of the given stereotype directly declared on the object.default booleanhasDeclaredStereotype(java.lang.String annotation)Checks whether this object has the given annotation stereotype on the object itself and not inherited from a parentdefault booleanhasPropertyExpressions()Does the metadata contain any property expressions like${foo.bar}.default booleanhasSimpleAnnotation(java.lang.String annotation)Checks whether the given annotation simple name (name without the package) is present in the annotations.default booleanhasSimpleDeclaredAnnotation(java.lang.String annotation)Checks whether the given annotation simple name (name without the package) is present in the declared annotations.default booleanhasStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)Checks whether this object has the given annotation stereotype on the object itself or inherited from a parentdefault booleanhasStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)Check whether any of the given stereotypes is present.default booleanhasStereotype(java.lang.String annotation)Checks whether this object has the given annotation stereotype on the object itself or inherited from a parentdefault booleanhasStereotype(java.lang.String[] annotations)Check whether any of the given stereotypes is present.default java.util.OptionalIntintValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)The value as anOptionalIntfor the given annotation and member.default java.util.OptionalIntintValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The value as anOptionalIntfor the given annotation and member.default java.util.OptionalIntintValue(java.lang.String annotation, java.lang.String member)The value as anOptionalIntfor the given annotation and member.default booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)Return whether an annotation is present.default booleanisDeclaredAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)Variation ofAnnotationSource.isAnnotationPresent(Class)for declared annotations.default booleanisEmpty()Is the annotation metadata empty.default booleanisFalse(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)Returns whether the value of the given member is true.default booleanisFalse(java.lang.String annotation, java.lang.String member)Returns whether the value of the given member is true.default booleanisPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)Returns whether the value of the given member is present.default booleanisPresent(java.lang.String annotation, java.lang.String member)Returns whether the value of the given member is present.default booleanisRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)Is repeatable annotation?default booleanisRepeatableAnnotation(java.lang.String annotation)Is repeatable annotation?default booleanisTrue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)Returns whether the value of the given member is true.default booleanisTrue(java.lang.String annotation, java.lang.String member)Returns whether the value of the given member is true.default java.util.OptionalLonglongValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The value as anOptionalLongfor the given annotation and member.default java.util.OptionalLonglongValue(java.lang.String annotation, java.lang.String member)The value as anOptionalLongfor the given annotation and member.default java.util.Optional<java.lang.String>stringValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)The value as an optional string for the given annotation and member.default java.util.Optional<java.lang.String>stringValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The value as an optional string for the given annotation and member.default java.util.Optional<java.lang.String>stringValue(java.lang.String annotation)The value as an optional string for the given annotation and member.default java.util.Optional<java.lang.String>stringValue(java.lang.String annotation, java.lang.String member)The value as an optional string for the given annotation and member.default java.lang.String[]stringValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)The values as string array for the given annotation and member.default java.lang.String[]stringValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)The values as string array for the given annotation and member.default java.lang.String[]stringValues(java.lang.String annotation)The values as string array for the given annotation and member.default java.lang.String[]stringValues(java.lang.String annotation, java.lang.String member)The values as string array for the given annotation and member.default <T extends java.lang.annotation.Annotation>
Tsynthesize(java.lang.Class<T> annotationClass)Synthesizes a new annotation from the metadata for the given annotation type.default <T extends java.lang.annotation.Annotation>
Tsynthesize(java.lang.Class<T> annotationClass, java.lang.String sourceAnnotation)Synthesizes a new annotation for the given annotation type using the member values of the given source annotation.default java.lang.annotation.Annotation[]synthesizeAll()Synthesizes a new annotations from the metadata.default <T extends java.lang.annotation.Annotation>
T[]synthesizeAnnotationsByType(java.lang.Class<T> annotationClass)Synthesizes a new annotations from the metadata for the given type.default java.lang.annotation.Annotation[]synthesizeDeclared()Synthesizes a new annotations from the metadata.default <T extends java.lang.annotation.Annotation>
TsynthesizeDeclared(java.lang.Class<T> annotationClass)Synthesizes a new annotation from the metadata for the given annotation type.default <T extends java.lang.annotation.Annotation>
TsynthesizeDeclared(java.lang.Class<T> annotationClass, java.lang.String sourceAnnotation)Synthesizes a new annotation declared for the given annotation type using the member values of the given source annotation.default <T extends java.lang.annotation.Annotation>
T[]synthesizeDeclaredAnnotationsByType(java.lang.Class<T> annotationClass)Synthesizes a new annotations from the metadata for the given type.-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadata
-
-
-
-
Method Detail
-
getStereotypeAnnotationNames
default java.util.Set<java.lang.String> getStereotypeAnnotationNames()
Description copied from interface:AnnotationMetadataReturns the names of the annotations which are stereotypes.A stereotype is a meta-annotation (an annotation declared on another annotation).
- Specified by:
getStereotypeAnnotationNamesin interfaceAnnotationMetadata- Returns:
- The names of the stereotype annotations
- See Also:
AnnotationMetadata.getDeclaredStereotypeAnnotationNames()
-
getDeclaredStereotypeAnnotationNames
default java.util.Set<java.lang.String> getDeclaredStereotypeAnnotationNames()
Description copied from interface:AnnotationMetadataReturns 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:
getDeclaredStereotypeAnnotationNamesin interfaceAnnotationMetadata- Returns:
- The names of the stereotype annotations
- See Also:
AnnotationMetadata.getStereotypeAnnotationNames(),AnnotationMetadata.getDeclaredAnnotationNames()
-
getDeclaredMetadata
@NonNull default AnnotationMetadata getDeclaredMetadata()
Description copied from interface:AnnotationMetadataGets the declared metadata without inherited metdata.- Specified by:
getDeclaredMetadatain interfaceAnnotationMetadata- Returns:
- The declared metadata
-
hasSimpleAnnotation
default boolean hasSimpleAnnotation(@Nullable java.lang.String annotation)
Description copied from interface:AnnotationMetadataChecks whether the given annotation simple name (name without the package) is present in the annotations.- Specified by:
hasSimpleAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
hasPropertyExpressions
default boolean hasPropertyExpressions()
Description copied from interface:AnnotationMetadataDoes the metadata contain any property expressions like${foo.bar}. Note this by default returnstrueas 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:
hasPropertyExpressionsin interfaceAnnotationMetadata- Returns:
- True if property expressions are present
-
hasSimpleDeclaredAnnotation
default boolean hasSimpleDeclaredAnnotation(@Nullable java.lang.String annotation)
Description copied from interface:AnnotationMetadataChecks whether the given annotation simple name (name without the package) is present in the declared annotations.- Specified by:
hasSimpleDeclaredAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
enumValues
default <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.String annotation, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe enum values for the given annotation.- Specified by:
enumValuesin interfaceAnnotationMetadata- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationenumType- The enum type- Returns:
- An array of enum values
-
enumValues
default <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe enum values for the given annotation.- Specified by:
enumValuesin 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 java.lang.Enum> E[] enumValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe enum values for the given annotation.- Specified by:
enumValuesin interfaceAnnotationMetadata- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationenumType- The enum type- Returns:
- An array of enum values
-
enumValues
default <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe enum values for the given annotation.- Specified by:
enumValuesin interfaceAnnotationMetadata- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationmember- The annotation memberenumType- The enum type- Returns:
- An array of enum values
-
classValues
default <T> java.lang.Class<T>[] classValues(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuesin interfaceAnnotationMetadata- Type Parameters:
T- The type of the class- Parameters:
annotation- The annotation- Returns:
- An
Optionalclass
-
classValues
default <T> java.lang.Class<T>[] classValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuesin interfaceAnnotationMetadata- Type Parameters:
T- The type of the class- Parameters:
annotation- The annotationmember- The annotation member- Returns:
- An
Optionalclass
-
classValues
default <T> java.lang.Class<T>[] classValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuesin interfaceAnnotationMetadata- Type Parameters:
T- The type of the class- Parameters:
annotation- The annotation- Returns:
- An
Optionalclass
-
classValues
default <T> java.lang.Class<T>[] classValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuesin interfaceAnnotationMetadata- Type Parameters:
T- The type of the class- Parameters:
annotation- The annotationmember- The annotation member- Returns:
- An
Optionalclass
-
enumValue
default <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.String annotation, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe value of the given enum.- Specified by:
enumValuein interfaceAnnotationMetadata- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationenumType- The enum type- Returns:
- An
Optionalenum value
-
enumValue
default <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
enumValuein interfaceAnnotationMetadata- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationmember- The annotation memberenumType- The enum type- Returns:
- An
Optionalclass
-
enumValue
default <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
enumValuein interfaceAnnotationMetadata- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationenumType- The enum type- Returns:
- An
Optionalclass
-
enumValue
default <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
enumValuein interfaceAnnotationMetadata- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationmember- The annotation memberenumType- The enum type- Returns:
- An
Optionalclass
-
longValue
default java.util.OptionalLong longValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as anOptionalLongfor the given annotation and member.- Specified by:
longValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- THe
OptionalLongvalue
-
booleanValue
default java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as an optional boolean for the given annotation and member.- Specified by:
booleanValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- The string value if it is present
-
booleanValue
default java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as an optional boolean for the given annotation and member.- Specified by:
booleanValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- The string value if it is present
-
booleanValue
@NonNull default java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataThe value as an optional boolean for the given annotation and member.- Specified by:
booleanValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- The string value if it is present
-
booleanValue
@NonNull default java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationMetadataThe value as an optional boolean for the given annotation and member.- Specified by:
booleanValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- The string value if it is present
-
stringValues
@NonNull default java.lang.String[] stringValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe values as string array for the given annotation and member.- Specified by:
stringValuesin interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- The string values if it is present
-
stringValues
@NonNull default java.lang.String[] stringValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataThe values as string array for the given annotation and member.- Specified by:
stringValuesin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- The string values if it is present
-
stringValues
@NonNull default java.lang.String[] stringValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe values as string array for the given annotation and member.- Specified by:
stringValuesin interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- The string values if it is present
-
stringValues
@NonNull default java.lang.String[] stringValues(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationMetadataThe values as string array for the given annotation and member.- Specified by:
stringValuesin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- The string values if it is present
-
intValue
@NonNull default java.util.OptionalInt intValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as anOptionalIntfor the given annotation and member.- Specified by:
intValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- THe
OptionalIntvalue
-
intValue
@NonNull default java.util.OptionalInt intValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataThe value as anOptionalIntfor the given annotation and member.- Specified by:
intValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- THe
OptionalIntvalue
-
stringValue
@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as an optional string for the given annotation and member.- Specified by:
stringValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- The string value if it is present
-
stringValue
@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as an optional string for the given annotation and member.- Specified by:
stringValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- The string value if it is present
-
stringValue
@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataThe value as an optional string for the given annotation and member.- Specified by:
stringValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- The string value if it is present
-
stringValue
@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationMetadataThe value as an optional string for the given annotation and member.- Specified by:
stringValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- The string value if it is present
-
doubleValue
@NonNull default java.util.OptionalDouble doubleValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as anOptionalDoublefor the given annotation and member.- Specified by:
doubleValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- THe
OptionalDoublevalue
-
doubleValue
@NonNull default java.util.OptionalDouble doubleValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataThe value as anOptionalDoublefor the given annotation and member.- Specified by:
doubleValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- THe
OptionalDoublevalue
-
getDefaultValues
@NonNull default java.util.Map<java.lang.String,java.lang.Object> getDefaultValues(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationMetadataReturn the default values for the given annotation name.- Specified by:
getDefaultValuesin interfaceAnnotationMetadata- Parameters:
annotation- The annotation name- Returns:
- The default values
-
getValue
@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull Argument<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of default "value" the given annotation.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- Generic type- Parameters:
annotation- The annotation classrequiredType- requiredType- Returns:
- An
Optionalof the value
-
getValue
@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull Argument<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of default "value" the given annotation.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- Generic type- Parameters:
annotation- The annotation classrequiredType- requiredType- Returns:
- An
Optionalof the value
-
getValue
@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull Argument<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of the given annotation member.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- The value- Parameters:
annotation- The annotation classmember- The annotation memberrequiredType- The required type- Returns:
- An
Optionalof the value
-
getDefaultValue
@NonNull default <T> java.util.Optional<T> getDefaultValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull Argument<T> requiredType)
Description copied from interface:AnnotationMetadataReturn the default value for the given annotation member.- Specified by:
getDefaultValuein 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> java.util.Optional<T> getDefaultValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @NonNull Argument<T> requiredType)
Description copied from interface:AnnotationMetadataReturn the default value for the given annotation member.- Specified by:
getDefaultValuein 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> java.util.Optional<T> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @NonNull Argument<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of the given annotation member.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- The value- Parameters:
annotation- The annotation classmember- The annotation memberrequiredType- The required type- Returns:
- An
Optionalof the value
-
synthesizeDeclared
default <T extends java.lang.annotation.Annotation> T synthesizeDeclared(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceSynthesizes 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:
synthesizeDeclaredin interfaceAnnotationMetadataProvider- Specified by:
synthesizeDeclaredin 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 java.lang.annotation.Annotation> T[] synthesizeAnnotationsByType(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceSynthesizes 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:
synthesizeAnnotationsByTypein interfaceAnnotationMetadataProvider- Specified by:
synthesizeAnnotationsByTypein 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 java.lang.annotation.Annotation> T[] synthesizeDeclaredAnnotationsByType(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceSynthesizes 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:
synthesizeDeclaredAnnotationsByTypein interfaceAnnotationMetadataProvider- Specified by:
synthesizeDeclaredAnnotationsByTypein 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 java.lang.annotation.Annotation> AnnotationValue<T> getAnnotation(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationSourceFind anAnnotationValuefor the given annotation name.- Specified by:
getAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotation- The annotation name- Returns:
- A
AnnotationValueinstance or null
-
getAnnotation
@Nullable default <T extends java.lang.annotation.Annotation> AnnotationValue<T> getAnnotation(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceFind anAnnotationValuefor the given annotation name.- Specified by:
getAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotationClass- The annotation name- Returns:
- A
AnnotationValueinstance or null
-
getDeclaredAnnotation
@Nullable default <T extends java.lang.annotation.Annotation> AnnotationValue<T> getDeclaredAnnotation(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationSourceGet all of the values for the given annotation that are directly declared on the annotated element.- Specified by:
getDeclaredAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotation- The annotation name- Returns:
- A
AnnotationValueinstance
-
findDeclaredAnnotation
@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findDeclaredAnnotation(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceGet all of the values for the given annotation that are directly declared on the annotated element.- Specified by:
findDeclaredAnnotationin interfaceAnnotationMetadata- Specified by:
findDeclaredAnnotationin interfaceAnnotationMetadataProvider- Specified by:
findDeclaredAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotationClass- The annotation name- Returns:
- A
AnnotationValueinstance
-
getDeclaredAnnotation
@Nullable default <T extends java.lang.annotation.Annotation> AnnotationValue<T> getDeclaredAnnotation(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceFind anAnnotationValuefor the given annotation name.- Specified by:
getDeclaredAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotationClass- The annotation name- Returns:
- A
AnnotationValueinstance or null
-
isAnnotationPresent
default boolean isAnnotationPresent(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Description copied from interface:AnnotationSourceReturn whether an annotation is present.- Specified by:
isAnnotationPresentin interfaceAnnotationMetadata- Specified by:
isAnnotationPresentin interfaceAnnotationMetadataProvider- Specified by:
isAnnotationPresentin interfaceAnnotationSource- Parameters:
annotationClass- The annotation class- Returns:
- True if it is
- See Also:
AnnotationSource.isAnnotationPresent(Class)
-
isDeclaredAnnotationPresent
default boolean isDeclaredAnnotationPresent(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Description copied from interface:AnnotationSourceVariation ofAnnotationSource.isAnnotationPresent(Class)for declared annotations.- Specified by:
isDeclaredAnnotationPresentin interfaceAnnotationMetadata- Specified by:
isDeclaredAnnotationPresentin interfaceAnnotationMetadataProvider- Specified by:
isDeclaredAnnotationPresentin interfaceAnnotationSource- Parameters:
annotationClass- The annotation class- Returns:
- True if it is
- See Also:
AnnotationSource.isAnnotationPresent(Class)
-
getDefaultValue
@NonNull default <T> java.util.Optional<T> getDefaultValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)
Description copied from interface:AnnotationMetadataReturn the default value for the given annotation member.- Specified by:
getDefaultValuein 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> java.util.Optional<T> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of the given annotation member.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- The value- Parameters:
annotation- The annotation classmember- The annotation memberrequiredType- The required type- Returns:
- An
Optionalof the value
-
getAnnotationNameByStereotype
@NonNull default java.util.Optional<java.lang.String> getAnnotationNameByStereotype(java.lang.String stereotype)
Description copied from interface:AnnotationMetadataFind the first annotation name for the given stereotype.- Specified by:
getAnnotationNameByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The annotation name
-
getDeclaredAnnotationNameByStereotype
@NonNull default java.util.Optional<java.lang.String> getDeclaredAnnotationNameByStereotype(java.lang.String stereotype)
Description copied from interface:AnnotationMetadataFind the first annotation name for the given stereotype.- Specified by:
getDeclaredAnnotationNameByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The annotation name
-
getAnnotationTypeByStereotype
@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypeByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Description copied from interface:AnnotationMetadataFind the first annotation name for the given stereotype.- Specified by:
getAnnotationTypeByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The annotation name
-
getDeclaredAnnotationTypeByStereotype
@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getDeclaredAnnotationTypeByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Description copied from interface:AnnotationMetadataFind the first declared annotation name for the given stereotype.- Specified by:
getDeclaredAnnotationTypeByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The annotation name
-
getDeclaredAnnotationTypeByStereotype
@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getDeclaredAnnotationTypeByStereotype(java.lang.String stereotype)
Description copied from interface:AnnotationMetadataFind the first annotation name for the given stereotype.- Specified by:
getDeclaredAnnotationTypeByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The annotation name
-
getAnnotationTypeByStereotype
@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypeByStereotype(java.lang.String stereotype)
Description copied from interface:AnnotationMetadataFind the first annotation name for the given stereotype.- Specified by:
getAnnotationTypeByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The annotation name
-
getAnnotationNameByStereotype
@NonNull default java.util.Optional<java.lang.String> getAnnotationNameByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Description copied from interface:AnnotationMetadataFind the first annotation name for the given stereotype.- Specified by:
getAnnotationNameByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The annotation name
-
getValues
@NonNull default <T> OptionalValues<T> getValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.Class<T> valueType)
Description copied from interface:AnnotationMetadataGet all of the values for the given annotation.- Specified by:
getValuesin interfaceAnnotationMetadata- Type Parameters:
T- Generic type- Parameters:
annotation- The annotation namevalueType- valueType- Returns:
- The
OptionalValues
-
getAnnotationNamesByStereotype
@NonNull default java.util.List<java.lang.String> getAnnotationNamesByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Description copied from interface:AnnotationMetadataResolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationNamesByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The annotation names- Returns:
- A set of annotation names
-
getAnnotationTypesByStereotype
@NonNull default java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypesByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Description copied from interface:AnnotationMetadataResolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationTypesByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The annotation names- Returns:
- A set of annotation names
-
getAnnotationTypesByStereotype
@NonNull default java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypesByStereotype(@NonNull java.lang.String stereotype)
Description copied from interface:AnnotationMetadataResolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationTypesByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The annotation names- Returns:
- A set of annotation names
-
getAnnotationTypesByStereotype
@NonNull default java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypesByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype, @NonNull java.lang.ClassLoader classLoader)
Description copied from interface:AnnotationMetadataResolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationTypesByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The annotation namesclassLoader- The classloader to load annotation type- Returns:
- A set of annotation names
-
findAnnotation
@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findAnnotation(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceFind anAnnotationValuefor the given annotation type.- Specified by:
findAnnotationin interfaceAnnotationMetadata- Specified by:
findAnnotationin interfaceAnnotationMetadataProvider- Specified by:
findAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotationClass- The annotation- Returns:
- A
AnnotationValueinstance
-
getValue
@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of the given annotation member.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- The value- Parameters:
annotation- The annotation classmember- The annotation memberrequiredType- The required type- Returns:
- An
Optionalof the value
-
longValue
@NonNull default java.util.OptionalLong longValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as anOptionalLongfor the given annotation and member.- Specified by:
longValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- THe
OptionalLongvalue
-
classValue
@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- An
Optionalclass
-
classValue
@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The annotation member- Returns:
- An
Optionalclass
-
classValue
@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- An
Optionalclass
-
classValue
@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value of the annotation as a Class.- Specified by:
classValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The annotation member- Returns:
- An
Optionalclass
-
intValue
@NonNull default java.util.OptionalInt intValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as anOptionalIntfor the given annotation and member.- Specified by:
intValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- THe
OptionalIntvalue
-
doubleValue
@NonNull default java.util.OptionalDouble doubleValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataThe value as anOptionalDoublefor the given annotation and member.- Specified by:
doubleValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotationmember- The member- Returns:
- THe
OptionalDoublevalue
-
getValue
@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.Class<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of default "value" the given annotation.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- The value- Parameters:
annotation- The annotation classrequiredType- The required type- Returns:
- An
Optionalof the value
-
getValue
@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataGet the value of the given annotation member.- Specified by:
getValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- An
Optionalof the value
-
getValue
@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataGet the value of the given annotation member.- Specified by:
getValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- An
Optionalof the value
-
isTrue
default boolean isTrue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataReturns whether the value of the given member is true.- Specified by:
isTruein interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- True if the value is true
-
isTrue
default boolean isTrue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataReturns whether the value of the given member is true.- Specified by:
isTruein interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- True if the value is true
-
isPresent
default boolean isPresent(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataReturns whether the value of the given member is present.- Specified by:
isPresentin interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- True if the value is true
-
isPresent
default boolean isPresent(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataReturns whether the value of the given member is present.- Specified by:
isPresentin interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- True if the value is true
-
isFalse
default boolean isFalse(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataReturns whether the value of the given member is true.- Specified by:
isFalsein interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- True if the value is true
-
isFalse
default boolean isFalse(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
Description copied from interface:AnnotationMetadataReturns whether the value of the given member is true.- Specified by:
isFalsein interfaceAnnotationMetadata- Parameters:
annotation- The annotation classmember- The annotation member- Returns:
- True if the value is true
-
getValue
@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationMetadataGet the value of default "value" the given annotation.- Specified by:
getValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation class- Returns:
- An
Optionalof the value
-
getValue
@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataGet the value of default "value" the given annotation.- Specified by:
getValuein interfaceAnnotationMetadata- Parameters:
annotation- The annotation class- Returns:
- An
Optionalof the value
-
getValue
@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.Class<T> requiredType)
Description copied from interface:AnnotationMetadataGet the value of default "value" the given annotation.- Specified by:
getValuein interfaceAnnotationMetadata- Type Parameters:
T- Generic type- Parameters:
annotation- The annotation classrequiredType- requiredType- Returns:
- An
Optionalof the value
-
getAnnotationType
@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationType(@NonNull java.lang.String name)
Description copied from interface:AnnotationMetadataGets the type for a given annotation if it is present on the classpath. Subclasses can potentially override to provide optimized loading.- Specified by:
getAnnotationTypein interfaceAnnotationMetadata- Parameters:
name- The type name- Returns:
- The type if present
-
getAnnotationType
@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationType(@NonNull java.lang.String name, @NonNull java.lang.ClassLoader classLoader)
Description copied from interface:AnnotationMetadataGets the type for a given annotation if it is present on the classpath. Subclasses can potentially override to provide optimized loading.- Specified by:
getAnnotationTypein interfaceAnnotationMetadata- Parameters:
name- The type nameclassLoader- The ClassLoader to load the type- Returns:
- The type if present
-
hasAnnotation
default boolean hasAnnotation(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataChecks whether this object has the given annotation on the object itself or inherited from a parent.- Specified by:
hasAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
hasStereotype
default boolean hasStereotype(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataChecks 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:
hasStereotypein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
hasStereotype
default boolean hasStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
Description copied from interface:AnnotationMetadataCheck whether any of the given stereotypes is present.- Specified by:
hasStereotypein interfaceAnnotationMetadata- Parameters:
annotations- The annotations- Returns:
- True if any of the given stereotypes are present
-
hasStereotype
default boolean hasStereotype(java.lang.String[] annotations)
Description copied from interface:AnnotationMetadataCheck whether any of the given stereotypes is present.- Specified by:
hasStereotypein interfaceAnnotationMetadata- Parameters:
annotations- The annotations- Returns:
- True if any of the given stereotypes are present
-
hasDeclaredAnnotation
default boolean hasDeclaredAnnotation(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataChecks whether this object has the given annotation directly declared on the object.- Specified by:
hasDeclaredAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
hasDeclaredStereotype
default boolean hasDeclaredStereotype(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Description copied from interface:AnnotationMetadataChecks whether this object has the given stereotype directly declared on the object.- Specified by:
hasDeclaredStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The annotation- Returns:
- True if the annotation is present
-
hasDeclaredStereotype
default boolean hasDeclaredStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
Description copied from interface:AnnotationMetadataChecks whether this object has any of the given stereotype directly declared on the object.- Specified by:
hasDeclaredStereotypein interfaceAnnotationMetadata- Parameters:
annotations- The annotations- Returns:
- True if any of the given stereotypes are present
-
isEmpty
default boolean isEmpty()
Description copied from interface:AnnotationMetadataIs the annotation metadata empty.- Specified by:
isEmptyin interfaceAnnotationMetadata- Returns:
- True if it is
-
hasDeclaredAnnotation
default boolean hasDeclaredAnnotation(java.lang.String annotation)
Description copied from interface:AnnotationMetadataChecks whether this object has the given annotation directly declared on the object.- Specified by:
hasDeclaredAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
getAnnotationNames
@NonNull default java.util.Set<java.lang.String> getAnnotationNames()
Description copied from interface:AnnotationMetadataAll the annotation names this metadata declares.- Specified by:
getAnnotationNamesin interfaceAnnotationMetadata- Returns:
- All the annotation names this metadata declares
-
getDeclaredAnnotationNames
@NonNull default java.util.Set<java.lang.String> getDeclaredAnnotationNames()
Description copied from interface:AnnotationMetadataAll the declared annotation names this metadata declares.- Specified by:
getDeclaredAnnotationNamesin interfaceAnnotationMetadata- Returns:
- All the declared annotation names this metadata declares
-
hasAnnotation
default boolean hasAnnotation(java.lang.String annotation)
Description copied from interface:AnnotationMetadataChecks whether this object has the given annotation on the object itself or inherited from a parent.- Specified by:
hasAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
hasStereotype
default boolean hasStereotype(java.lang.String annotation)
Description copied from interface:AnnotationMetadataChecks 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:
hasStereotypein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
hasDeclaredStereotype
default boolean hasDeclaredStereotype(java.lang.String annotation)
Description copied from interface:AnnotationMetadataChecks 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:
hasDeclaredStereotypein interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- True if the annotation is present
-
getAnnotationNamesByStereotype
@NonNull default java.util.List<java.lang.String> getAnnotationNamesByStereotype(java.lang.String stereotype)
Description copied from interface:AnnotationMetadataResolve all of the annotation names that feature the given stereotype.- Specified by:
getAnnotationNamesByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The annotation names- Returns:
- A set of annotation names
-
getDeclaredAnnotationNamesByStereotype
@NonNull default java.util.List<java.lang.String> getDeclaredAnnotationNamesByStereotype(java.lang.String stereotype)
Description copied from interface:AnnotationMetadataResolve all of the annotations names for the given stereotype that are declared annotations.- Specified by:
getDeclaredAnnotationNamesByStereotypein interfaceAnnotationMetadata- Parameters:
stereotype- The stereotype- Returns:
- The declared annotations
-
findAnnotation
@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findAnnotation(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationSourceFind anAnnotationValuefor the given annotation name.- Specified by:
findAnnotationin interfaceAnnotationMetadataProvider- Specified by:
findAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotation- The annotation name- Returns:
- A
AnnotationValueinstance
-
getValues
@NonNull default <T> OptionalValues<T> getValues(@NonNull java.lang.String annotation, @NonNull java.lang.Class<T> valueType)
Description copied from interface:AnnotationMetadataGet all of the values for the given annotation and type of the underlying values.- Specified by:
getValuesin interfaceAnnotationMetadata- Type Parameters:
T- Generic type- Parameters:
annotation- The annotation namevalueType- valueType- Returns:
- The
OptionalValues
-
findDeclaredAnnotation
@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findDeclaredAnnotation(@NonNull java.lang.String annotation)
Description copied from interface:AnnotationSourceGet all of the values for the given annotation that are directly declared on the annotated element.- Specified by:
findDeclaredAnnotationin interfaceAnnotationMetadataProvider- Specified by:
findDeclaredAnnotationin interfaceAnnotationSource- Type Parameters:
T- The annotation type- Parameters:
annotation- The annotation name- Returns:
- A
AnnotationValueinstance
-
getDefaultValue
@NonNull default <T> java.util.Optional<T> getDefaultValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)
Description copied from interface:AnnotationMetadataReturn the default value for the given annotation member.- Specified by:
getDefaultValuein interfaceAnnotationMetadata- Type Parameters:
T- The required generic type- Parameters:
annotation- The annotationmember- The memberrequiredType- The required type- Returns:
- An optional value
-
synthesize
@Nullable default <T extends java.lang.annotation.Annotation> T synthesize(@NonNull java.lang.Class<T> annotationClass)
Description copied from interface:AnnotationSourceSynthesizes 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:
synthesizein interfaceAnnotationMetadataProvider- Specified by:
synthesizein 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 java.lang.annotation.Annotation> T synthesize(@NonNull java.lang.Class<T> annotationClass, @NonNull java.lang.String sourceAnnotation)
Description copied from interface:AnnotationSourceSynthesizes 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.Namedannotation an be synthesized from the metadata of the ajavax.inject.Namedannotation.- Specified by:
synthesizein 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 java.lang.annotation.Annotation> T synthesizeDeclared(@NonNull java.lang.Class<T> annotationClass, @NonNull java.lang.String sourceAnnotation)
Description copied from interface:AnnotationSourceSynthesizes 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.Namedannotation an be synthesized from the metadata of the ajavax.inject.Namedannotation.- Specified by:
synthesizeDeclaredin 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
@NonNull default java.lang.annotation.Annotation[] synthesizeAll()
Description copied from interface:AnnotationSourceSynthesizes 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:
synthesizeAllin interfaceAnnotationMetadataProvider- Specified by:
synthesizeAllin interfaceAnnotationSource- Returns:
- All the annotations
-
synthesizeDeclared
@NonNull default java.lang.annotation.Annotation[] synthesizeDeclared()
Description copied from interface:AnnotationSourceSynthesizes 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:
synthesizeDeclaredin interfaceAnnotationMetadataProvider- Specified by:
synthesizeDeclaredin interfaceAnnotationSource- Returns:
- All declared annotations
-
getAnnotationValuesByType
@NonNull default <T extends java.lang.annotation.Annotation> java.util.List<AnnotationValue<T>> getAnnotationValuesByType(@NonNull java.lang.Class<T> annotationType)
Description copied from interface:AnnotationMetadataGets all the annotation values by the given repeatable type.- Specified by:
getAnnotationValuesByTypein interfaceAnnotationMetadata- Type Parameters:
T- The annotation type- Parameters:
annotationType- The annotation type- Returns:
- A list of values
-
getDeclaredAnnotationValuesByType
@NonNull default <T extends java.lang.annotation.Annotation> java.util.List<AnnotationValue<T>> getDeclaredAnnotationValuesByType(@NonNull java.lang.Class<T> annotationType)
Description copied from interface:AnnotationMetadataGets only declared annotation values by the given repeatable type.- Specified by:
getDeclaredAnnotationValuesByTypein interfaceAnnotationMetadata- Type Parameters:
T- The annotation type- Parameters:
annotationType- The annotation type- Returns:
- A list of values
-
isRepeatableAnnotation
default boolean isRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataIs repeatable annotation?- Specified by:
isRepeatableAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- true if repeatable
-
isRepeatableAnnotation
default boolean isRepeatableAnnotation(java.lang.String annotation)
Description copied from interface:AnnotationMetadataIs repeatable annotation?- Specified by:
isRepeatableAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- true if repeatable
-
findRepeatableAnnotation
default java.util.Optional<java.lang.String> findRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Description copied from interface:AnnotationMetadataFind repeatable annotation container.- Specified by:
findRepeatableAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- optional repeatable annotation container
-
findRepeatableAnnotation
default java.util.Optional<java.lang.String> findRepeatableAnnotation(java.lang.String annotation)
Description copied from interface:AnnotationMetadataFind repeatable annotation container.- Specified by:
findRepeatableAnnotationin interfaceAnnotationMetadata- Parameters:
annotation- The annotation- Returns:
- optional repeatable annotation container
-
-