public interface AnnotationMetadataDelegate extends AnnotationMetadataProvider, AnnotationMetadata
AnnotationMetadata
to the AnnotationMetadataProvider.getAnnotationMetadata()
method.CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and 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.OptionalDouble |
doubleValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
The value as an
OptionalDouble for the given annotation and member. |
default java.util.OptionalDouble |
doubleValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.lang.String member)
The value as an
OptionalDouble for the given annotation and member. |
default java.util.OptionalDouble |
doubleValue(java.lang.String annotation,
java.lang.String member)
The value as an
OptionalDouble for the given annotation and member. |
default <E extends java.lang.Enum> |
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> |
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> |
enumValue(java.lang.String annotation,
java.lang.Class<E> enumType)
The value of the given enum.
|
default <E extends java.lang.Enum> |
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> |
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> |
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> |
enumValues(java.lang.String annotation,
java.lang.Class<E> enumType)
The enum values for the given annotation.
|
default <E extends java.lang.Enum> |
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> |
findAnnotation(java.lang.Class<T> annotationClass)
Find an
AnnotationValue for the given annotation type. |
default <T extends java.lang.annotation.Annotation> |
findAnnotation(java.lang.String annotation)
Find an
AnnotationValue for the given annotation name. |
default <T extends java.lang.annotation.Annotation> |
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> |
findDeclaredAnnotation(java.lang.String annotation)
Get all of the values for the given annotation that are directly declared on the annotated element.
|
default <T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass)
Find an
AnnotationValue for the given annotation name. |
default <T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.String annotation)
Find an
AnnotationValue for 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>> |
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 <T extends java.lang.annotation.Annotation> |
getAnnotationValuesByType(java.lang.Class<T> annotationType)
Gets all the annotation values by the given repeatable type.
|
default <T extends java.lang.annotation.Annotation> |
getDeclaredAnnotation(java.lang.Class<T> annotationClass)
Find an
AnnotationValue for the given annotation name. |
default <T extends java.lang.annotation.Annotation> |
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> |
getDeclaredAnnotationValuesByType(java.lang.Class<T> annotationType)
Gets only declared annotation values by the given repeatable type.
|
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.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 boolean |
hasAnnotation(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 boolean |
hasAnnotation(java.lang.String annotation)
Checks whether this object has the given annotation on the object itself or inherited from a parent.
|
default boolean |
hasDeclaredAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Checks whether this object has the given annotation directly declared on the object.
|
default boolean |
hasDeclaredAnnotation(java.lang.String annotation)
Checks whether this object has the given annotation directly declared on the object.
|
default boolean |
hasDeclaredStereotype(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 boolean |
hasDeclaredStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Checks whether this object has the given stereotype directly declared on the object.
|
default boolean |
hasDeclaredStereotype(java.lang.String annotation)
Checks whether this object has the given annotation stereotype on the object itself and not inherited from a parent
|
default boolean |
hasSimpleAnnotation(java.lang.String annotation)
Checks whether the given annotation simple name (name without the package) is present in the annotations.
|
default boolean |
hasSimpleDeclaredAnnotation(java.lang.String annotation)
Checks whether the given annotation simple name (name without the package) is present in the declared annotations.
|
default boolean |
hasStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
Check whether any of the given stereotypes is present.
|
default boolean |
hasStereotype(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 parent
|
default boolean |
hasStereotype(java.lang.String annotation)
Checks whether this object has the given annotation stereotype on the object itself or inherited from a parent
|
default boolean |
hasStereotype(java.lang.String[] annotations)
Check whether any of the given stereotypes is present.
|
default java.util.OptionalInt |
intValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
The value as an
OptionalInt for the given annotation and member. |
default java.util.OptionalInt |
intValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.lang.String member)
The value as an
OptionalInt for the given annotation and member. |
default java.util.OptionalInt |
intValue(java.lang.String annotation,
java.lang.String member)
The value as an
OptionalInt for the given annotation and member. |
default boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Return whether an annotation is present.
|
default boolean |
isDeclaredAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Variation of
AnnotationSource.isAnnotationPresent(Class) for declared annotations. |
default boolean |
isEmpty()
Is the annotation metadata empty.
|
default boolean |
isFalse(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.lang.String member)
Returns whether the value of the given member is true.
|
default boolean |
isFalse(java.lang.String annotation,
java.lang.String member)
Returns whether the value of the given member is true.
|
default boolean |
isPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.lang.String member)
Returns whether the value of the given member is present.
|
default boolean |
isPresent(java.lang.String annotation,
java.lang.String member)
Returns whether the value of the given member is present.
|
default boolean |
isTrue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.lang.String member)
Returns whether the value of the given member is true.
|
default boolean |
isTrue(java.lang.String annotation,
java.lang.String member)
Returns whether the value of the given member is true.
|
default java.util.OptionalLong |
longValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.lang.String member)
The value as an
OptionalLong for the given annotation and member. |
default java.util.OptionalLong |
longValue(java.lang.String annotation,
java.lang.String member)
The value as an
OptionalLong for 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 <T extends java.lang.annotation.Annotation> |
synthesize(java.lang.Class<T> annotationClass)
Synthesizes a new annotation from the metadata for the given annotation type.
|
default java.lang.annotation.Annotation[] |
synthesizeAll()
Synthesizes a new annotations from the metadata.
|
default <T extends java.lang.annotation.Annotation> |
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> |
synthesizeDeclared(java.lang.Class<T> annotationClass)
Synthesizes a new annotation from the metadata for the given annotation type.
|
default <T extends java.lang.annotation.Annotation> |
synthesizeDeclaredAnnotationsByType(java.lang.Class<T> annotationClass)
Synthesizes a new annotations from the metadata for the given type.
|
getAnnotationMetadata
default boolean hasSimpleAnnotation(@Nullable java.lang.String annotation)
AnnotationMetadata
hasSimpleAnnotation
in interface AnnotationMetadata
annotation
- The annotationdefault boolean hasSimpleDeclaredAnnotation(@Nullable java.lang.String annotation)
AnnotationMetadata
hasSimpleDeclaredAnnotation
in interface AnnotationMetadata
annotation
- The annotationdefault <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.String annotation, java.lang.Class<E> enumType)
AnnotationMetadata
enumValues
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationenumType
- The enum typedefault <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)
AnnotationMetadata
enumValues
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum typedefault <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)
AnnotationMetadata
enumValues
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationenumType
- The enum typedefault <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)
AnnotationMetadata
enumValues
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum typedefault <T> java.lang.Class<T>[] classValues(@NonNull java.lang.String annotation)
AnnotationMetadata
classValues
in interface AnnotationMetadata
T
- The type of the classannotation
- The annotationOptional
classdefault <T> java.lang.Class<T>[] classValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
classValues
in interface AnnotationMetadata
T
- The type of the classannotation
- The annotationmember
- The annotation memberOptional
classdefault <T> java.lang.Class<T>[] classValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
classValues
in interface AnnotationMetadata
T
- The type of the classannotation
- The annotationOptional
classdefault <T> java.lang.Class<T>[] classValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
classValues
in interface AnnotationMetadata
T
- The type of the classannotation
- The annotationmember
- The annotation memberOptional
classdefault <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.String annotation, java.lang.Class<E> enumType)
AnnotationMetadata
enumValue
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationenumType
- The enum typeOptional
enum valuedefault <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)
AnnotationMetadata
enumValue
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum typeOptional
classdefault <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)
AnnotationMetadata
enumValue
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationenumType
- The enum typeOptional
classdefault <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)
AnnotationMetadata
enumValue
in interface AnnotationMetadata
E
- The enum typeannotation
- The annotationmember
- The annotation memberenumType
- The enum typeOptional
classdefault java.util.OptionalLong longValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
OptionalLong
for the given annotation and member.longValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The memberOptionalLong
valuedefault java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
booleanValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The memberdefault java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
booleanValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The member@NonNull default java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
booleanValue
in interface AnnotationMetadata
annotation
- The annotation@NonNull default java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.String annotation)
AnnotationMetadata
booleanValue
in interface AnnotationMetadata
annotation
- The annotation@NonNull default java.lang.String[] stringValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
stringValues
in interface AnnotationMetadata
annotation
- The annotationmember
- The member@NonNull default java.lang.String[] stringValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
stringValues
in interface AnnotationMetadata
annotation
- The annotation@NonNull default java.util.OptionalInt intValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
OptionalInt
for the given annotation and member.intValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The memberOptionalInt
value@NonNull default java.util.OptionalInt intValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
OptionalInt
for the given annotation and member.intValue
in interface AnnotationMetadata
annotation
- The annotationOptionalInt
value@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
stringValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The member@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
stringValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The member@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
stringValue
in interface AnnotationMetadata
annotation
- The annotation@NonNull default java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.String annotation)
AnnotationMetadata
stringValue
in interface AnnotationMetadata
annotation
- The annotation@NonNull default java.util.OptionalDouble doubleValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
OptionalDouble
for the given annotation and member.doubleValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The memberOptionalDouble
value@NonNull default java.util.OptionalDouble doubleValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
OptionalDouble
for the given annotation and member.doubleValue
in interface AnnotationMetadata
annotation
- The annotationOptionalDouble
value@NonNull default java.util.Map<java.lang.String,java.lang.Object> getDefaultValues(@NonNull java.lang.String annotation)
AnnotationMetadata
getDefaultValues
in interface AnnotationMetadata
annotation
- The annotation name@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull Argument<T> requiredType)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- Generic typeannotation
- The annotation classrequiredType
- requiredTypeOptional
of the value@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull Argument<T> requiredType)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- Generic typeannotation
- The annotation classrequiredType
- requiredTypeOptional
of the value@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull Argument<T> requiredType)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the value@NonNull default <T> java.util.Optional<T> getDefaultValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull Argument<T> requiredType)
AnnotationMetadata
getDefaultValue
in interface AnnotationMetadata
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required type@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)
AnnotationMetadata
getDefaultValue
in interface AnnotationMetadata
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required type@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)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the valuedefault <T extends java.lang.annotation.Annotation> T synthesizeDeclared(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
This method ignores inherited annotations. (Returns null if no annotations are directly present on this element.)
synthesizeDeclared
in interface AnnotationMetadataProvider
synthesizeDeclared
in interface AnnotationSource
T
- The annotation generic typeannotationClass
- The annotation class@NonNull default <T extends java.lang.annotation.Annotation> T[] synthesizeAnnotationsByType(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
synthesizeAnnotationsByType
in interface AnnotationMetadataProvider
synthesizeAnnotationsByType
in interface AnnotationSource
T
- The annotation generic typeannotationClass
- The annotation type@NonNull default <T extends java.lang.annotation.Annotation> T[] synthesizeDeclaredAnnotationsByType(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
synthesizeDeclaredAnnotationsByType
in interface AnnotationMetadataProvider
synthesizeDeclaredAnnotationsByType
in interface AnnotationSource
T
- The annotation generic typeannotationClass
- The annotation type@Nullable default <T extends java.lang.annotation.Annotation> AnnotationValue<T> getAnnotation(@NonNull java.lang.String annotation)
AnnotationSource
AnnotationValue
for the given annotation name.getAnnotation
in interface AnnotationSource
T
- The annotation typeannotation
- The annotation nameAnnotationValue
instance or null@Nullable default <T extends java.lang.annotation.Annotation> AnnotationValue<T> getAnnotation(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
AnnotationValue
for the given annotation name.getAnnotation
in interface AnnotationSource
T
- The annotation typeannotationClass
- The annotation nameAnnotationValue
instance or null@Nullable default <T extends java.lang.annotation.Annotation> AnnotationValue<T> getDeclaredAnnotation(@NonNull java.lang.String annotation)
AnnotationSource
getDeclaredAnnotation
in interface AnnotationSource
T
- The annotation typeannotation
- The annotation nameAnnotationValue
instance@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findDeclaredAnnotation(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
findDeclaredAnnotation
in interface AnnotationMetadata
findDeclaredAnnotation
in interface AnnotationMetadataProvider
findDeclaredAnnotation
in interface AnnotationSource
T
- The annotation typeannotationClass
- The annotation nameAnnotationValue
instance@Nullable default <T extends java.lang.annotation.Annotation> AnnotationValue<T> getDeclaredAnnotation(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
AnnotationValue
for the given annotation name.getDeclaredAnnotation
in interface AnnotationSource
T
- The annotation typeannotationClass
- The annotation nameAnnotationValue
instance or nulldefault boolean isAnnotationPresent(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
AnnotationSource
isAnnotationPresent
in interface AnnotationMetadata
isAnnotationPresent
in interface AnnotationMetadataProvider
isAnnotationPresent
in interface AnnotationSource
annotationClass
- The annotation classAnnotationSource.isAnnotationPresent(Class)
default boolean isDeclaredAnnotationPresent(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
AnnotationSource
AnnotationSource.isAnnotationPresent(Class)
for declared annotations.isDeclaredAnnotationPresent
in interface AnnotationMetadata
isDeclaredAnnotationPresent
in interface AnnotationMetadataProvider
isDeclaredAnnotationPresent
in interface AnnotationSource
annotationClass
- The annotation classAnnotationSource.isAnnotationPresent(Class)
@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)
AnnotationMetadata
getDefaultValue
in interface AnnotationMetadata
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required type@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)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the value@NonNull default java.util.Optional<java.lang.String> getAnnotationNameByStereotype(java.lang.String stereotype)
AnnotationMetadata
getAnnotationNameByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default java.util.Optional<java.lang.String> getDeclaredAnnotationNameByStereotype(java.lang.String stereotype)
AnnotationMetadata
getDeclaredAnnotationNameByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypeByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
AnnotationMetadata
getAnnotationTypeByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getDeclaredAnnotationTypeByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
AnnotationMetadata
getDeclaredAnnotationTypeByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getDeclaredAnnotationTypeByStereotype(java.lang.String stereotype)
AnnotationMetadata
getDeclaredAnnotationTypeByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypeByStereotype(java.lang.String stereotype)
AnnotationMetadata
getAnnotationTypeByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default java.util.Optional<java.lang.String> getAnnotationNameByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
AnnotationMetadata
getAnnotationNameByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default <T> OptionalValues<T> getValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.Class<T> valueType)
AnnotationMetadata
getValues
in interface AnnotationMetadata
T
- Generic typeannotation
- The annotation namevalueType
- valueTypeOptionalValues
@NonNull default java.util.List<java.lang.String> getAnnotationNamesByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
AnnotationMetadata
getAnnotationNamesByStereotype
in interface AnnotationMetadata
stereotype
- The annotation names@NonNull default java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypesByStereotype(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
AnnotationMetadata
getAnnotationTypesByStereotype
in interface AnnotationMetadata
stereotype
- The annotation names@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findAnnotation(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
AnnotationValue
for the given annotation type.findAnnotation
in interface AnnotationMetadata
findAnnotation
in interface AnnotationMetadataProvider
findAnnotation
in interface AnnotationSource
T
- The annotation typeannotationClass
- The annotationAnnotationValue
instance@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- The valueannotation
- The annotation classmember
- The annotation memberrequiredType
- The required typeOptional
of the value@NonNull default java.util.OptionalLong longValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
OptionalLong
for the given annotation and member.longValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The memberOptionalLong
value@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.String annotation)
AnnotationMetadata
classValue
in interface AnnotationMetadata
annotation
- The annotationOptional
class@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
classValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The annotation memberOptional
class@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
classValue
in interface AnnotationMetadata
annotation
- The annotationOptional
class@NonNull default java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
classValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The annotation memberOptional
class@NonNull default java.util.OptionalInt intValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
OptionalInt
for the given annotation and member.intValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The memberOptionalInt
value@NonNull default java.util.OptionalDouble doubleValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
OptionalDouble
for the given annotation and member.doubleValue
in interface AnnotationMetadata
annotation
- The annotationmember
- The memberOptionalDouble
value@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.Class<T> requiredType)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- The valueannotation
- The annotation classrequiredType
- The required typeOptional
of the value@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
getValue
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation memberOptional
of the value@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
getValue
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation memberOptional
of the valuedefault boolean isTrue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
isTrue
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation memberdefault boolean isTrue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
isTrue
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation memberdefault boolean isPresent(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
isPresent
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation memberdefault boolean isPresent(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
isPresent
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation memberdefault boolean isFalse(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)
AnnotationMetadata
isFalse
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation memberdefault boolean isFalse(@NonNull java.lang.String annotation, @NonNull java.lang.String member)
AnnotationMetadata
isFalse
in interface AnnotationMetadata
annotation
- The annotation classmember
- The annotation member@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.String annotation)
AnnotationMetadata
getValue
in interface AnnotationMetadata
annotation
- The annotation classOptional
of the value@NonNull default java.util.Optional<java.lang.Object> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
getValue
in interface AnnotationMetadata
annotation
- The annotation classOptional
of the value@NonNull default <T> java.util.Optional<T> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.Class<T> requiredType)
AnnotationMetadata
getValue
in interface AnnotationMetadata
T
- Generic typeannotation
- The annotation classrequiredType
- requiredTypeOptional
of the value@NonNull default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationType(@NonNull java.lang.String name)
AnnotationMetadata
getAnnotationType
in interface AnnotationMetadata
name
- The type namedefault boolean hasAnnotation(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
hasAnnotation
in interface AnnotationMetadata
annotation
- The annotationdefault boolean hasStereotype(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
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
hasStereotype
in interface AnnotationMetadata
annotation
- The annotationdefault boolean hasStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
AnnotationMetadata
hasStereotype
in interface AnnotationMetadata
annotations
- The annotationsdefault boolean hasStereotype(java.lang.String[] annotations)
AnnotationMetadata
hasStereotype
in interface AnnotationMetadata
annotations
- The annotationsdefault boolean hasDeclaredAnnotation(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
AnnotationMetadata
hasDeclaredAnnotation
in interface AnnotationMetadata
annotation
- The annotationdefault boolean hasDeclaredStereotype(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
AnnotationMetadata
hasDeclaredStereotype
in interface AnnotationMetadata
stereotype
- The annotationdefault boolean hasDeclaredStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
AnnotationMetadata
hasDeclaredStereotype
in interface AnnotationMetadata
annotations
- The annotationsdefault boolean isEmpty()
AnnotationMetadata
isEmpty
in interface AnnotationMetadata
default boolean hasDeclaredAnnotation(java.lang.String annotation)
AnnotationMetadata
hasDeclaredAnnotation
in interface AnnotationMetadata
annotation
- The annotation@NonNull default java.util.Set<java.lang.String> getAnnotationNames()
AnnotationMetadata
getAnnotationNames
in interface AnnotationMetadata
@NonNull default java.util.Set<java.lang.String> getDeclaredAnnotationNames()
AnnotationMetadata
getDeclaredAnnotationNames
in interface AnnotationMetadata
default boolean hasAnnotation(java.lang.String annotation)
AnnotationMetadata
hasAnnotation
in interface AnnotationMetadata
annotation
- The annotationdefault boolean hasStereotype(java.lang.String annotation)
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
hasStereotype
in interface AnnotationMetadata
annotation
- The annotationdefault boolean hasDeclaredStereotype(java.lang.String annotation)
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
hasDeclaredStereotype
in interface AnnotationMetadata
annotation
- The annotation@NonNull default java.util.List<java.lang.String> getAnnotationNamesByStereotype(java.lang.String stereotype)
AnnotationMetadata
getAnnotationNamesByStereotype
in interface AnnotationMetadata
stereotype
- The annotation names@NonNull default java.util.List<java.lang.String> getDeclaredAnnotationNamesByStereotype(java.lang.String stereotype)
AnnotationMetadata
getDeclaredAnnotationNamesByStereotype
in interface AnnotationMetadata
stereotype
- The stereotype@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findAnnotation(@NonNull java.lang.String annotation)
AnnotationSource
AnnotationValue
for the given annotation name.findAnnotation
in interface AnnotationMetadataProvider
findAnnotation
in interface AnnotationSource
T
- The annotation typeannotation
- The annotation nameAnnotationValue
instance@NonNull default <T> OptionalValues<T> getValues(@NonNull java.lang.String annotation, @NonNull java.lang.Class<T> valueType)
AnnotationMetadata
getValues
in interface AnnotationMetadata
T
- Generic typeannotation
- The annotation namevalueType
- valueTypeOptionalValues
@NonNull default <T extends java.lang.annotation.Annotation> java.util.Optional<AnnotationValue<T>> findDeclaredAnnotation(@NonNull java.lang.String annotation)
AnnotationSource
findDeclaredAnnotation
in interface AnnotationMetadataProvider
findDeclaredAnnotation
in interface AnnotationSource
T
- The annotation typeannotation
- The annotation nameAnnotationValue
instance@NonNull default <T> java.util.Optional<T> getDefaultValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)
AnnotationMetadata
getDefaultValue
in interface AnnotationMetadata
T
- The required generic typeannotation
- The annotationmember
- The memberrequiredType
- The required type@Nullable default <T extends java.lang.annotation.Annotation> T synthesize(@NonNull java.lang.Class<T> annotationClass)
AnnotationSource
synthesize
in interface AnnotationMetadataProvider
synthesize
in interface AnnotationSource
T
- The annotation generic typeannotationClass
- The annotation class@NonNull default java.lang.annotation.Annotation[] synthesizeAll()
AnnotationSource
synthesizeAll
in interface AnnotationMetadataProvider
synthesizeAll
in interface AnnotationSource
@NonNull default java.lang.annotation.Annotation[] synthesizeDeclared()
AnnotationSource
synthesizeDeclared
in interface AnnotationMetadataProvider
synthesizeDeclared
in interface AnnotationSource
@NonNull default <T extends java.lang.annotation.Annotation> java.util.List<AnnotationValue<T>> getAnnotationValuesByType(@NonNull java.lang.Class<T> annotationType)
AnnotationMetadata
getAnnotationValuesByType
in interface AnnotationMetadata
T
- The annotation typeannotationType
- The annotation type@NonNull default <T extends java.lang.annotation.Annotation> java.util.List<AnnotationValue<T>> getDeclaredAnnotationValuesByType(@NonNull java.lang.Class<T> annotationType)
AnnotationMetadata
getDeclaredAnnotationValuesByType
in interface AnnotationMetadata
T
- The annotation typeannotationType
- The annotation type