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