Example usage for Java org.springframework.core.annotation AnnotationUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
String | VALUE The attribute name for annotations with a single element. |
A | findAnnotation(AnnotatedElement annotatedElement, @Nullable Class annotationType) Find a single Annotation of annotationType on the supplied AnnotatedElement . |
A | findAnnotation(Method method, @Nullable Class annotationType) Find a single Annotation of annotationType on the supplied Method , traversing its super methods (i.e. |
A | findAnnotation(Class> clazz, @Nullable Class annotationType) Find a single Annotation of annotationType on the supplied Class , traversing its interfaces, annotations, and superclasses if the annotation is not directly present on the given class itself. |
Class> | findAnnotationDeclaringClass(Class extends Annotation> annotationType, @Nullable Class> clazz) Find the first Class in the inheritance hierarchy of the specified clazz (including the specified clazz itself) on which an annotation of the specified annotationType is directly present. |
A | getAnnotation(Annotation annotation, Class annotationType) Get a single Annotation of annotationType from the supplied annotation: either the given annotation itself or a direct meta-annotation thereof. |
A | getAnnotation(AnnotatedElement annotatedElement, Class annotationType) Get a single Annotation of annotationType from the supplied AnnotatedElement , where the annotation is either present or meta-present on the AnnotatedElement . |
A | getAnnotation(Method method, Class annotationType) Get a single Annotation of annotationType from the supplied Method , where the annotation is either present or meta-present on the method. |
Map | getAnnotationAttributes(Annotation annotation, boolean classValuesAsString) Retrieve the given annotation's attributes as a Map . |
AnnotationAttributes | getAnnotationAttributes(@Nullable AnnotatedElement annotatedElement, Annotation annotation) Retrieve the given annotation's attributes as an AnnotationAttributes map. |
Map | getAnnotationAttributes(Annotation annotation) Retrieve the given annotation's attributes as a Map , preserving all attribute types. |
AnnotationAttributes | getAnnotationAttributes(Annotation annotation, boolean classValuesAsString, boolean nestedAnnotationsAsMap) Retrieve the given annotation's attributes as an AnnotationAttributes map. |
Annotation[] | getAnnotations(AnnotatedElement annotatedElement) Get all Annotation Annotations that are present on the supplied AnnotatedElement . |
Annotation[] | getAnnotations(Method method) Get all Annotation Annotations that are present on the supplied Method . |
Set | getDeclaredRepeatableAnnotations(AnnotatedElement annotatedElement, Class annotationType) Get the declared repeatable Annotation annotations of annotationType from the supplied AnnotatedElement , where such annotations are either directly present, indirectly present, or meta-present on the element. |
Object | getDefaultValue(@Nullable Annotation annotation, @Nullable String attributeName) Retrieve the default value of a named attribute, given an annotation instance. |
Object | getDefaultValue(@Nullable Class extends Annotation> annotationType, @Nullable String attributeName) Retrieve the default value of a named attribute, given the Class annotation type . |
Object | getDefaultValue(Annotation annotation) Retrieve the default value of the value attribute of a single-element Annotation, given an annotation instance. |
Object | getDefaultValue(Class extends Annotation> annotationType) Retrieve the default value of the value attribute of a single-element Annotation, given the Class annotation type . |
Object | getValue(@Nullable Annotation annotation, @Nullable String attributeName) Retrieve the value of a named attribute, given an annotation instance. |
Object | getValue(Annotation annotation) Retrieve the value of the value attribute of a single-element Annotation, given an annotation instance. |
boolean | isAnnotationDeclaredLocally(Class extends Annotation> annotationType, Class> clazz) Determine whether an annotation of the specified annotationType is declared locally (i.e. |
A | synthesizeAnnotation(A annotation, @Nullable AnnotatedElement annotatedElement) Synthesize an annotation from the supplied annotation by wrapping it in a dynamic proxy that transparently enforces attribute alias semantics for annotation attributes that are annotated with AliasFor @AliasFor . |
A | synthesizeAnnotation(Map Synthesize an annotation from the supplied map of annotation attributes by wrapping the map in a dynamic proxy that implements an annotation of the specified annotationType and transparently enforces attribute alias semantics for annotation attributes that are annotated with AliasFor @AliasFor . |