java.lang.Object | ||
↳ | org.springframework.core.type.StandardClassMetadata | |
↳ | org.springframework.core.type.StandardAnnotationMetadata |
AnnotationMetadata
implementation that uses standard reflection
to introspect a given Class
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new StandardAnnotationMetadata wrapper for the given Class.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve the method metadata for all methods that are annotated
(or meta-annotated) with the given annotation type.
| |||||||||||
Retrieve the attributes of the annotation of the given type,
if any (i.e.
| |||||||||||
Retrieve the attributes of the annotation of the given type,
if any (i.e.
| |||||||||||
Return the names of all annotation types defined on the underlying class.
| |||||||||||
Return the names of all meta-annotation types defined on the
given annotation type of the underlying class.
| |||||||||||
Determine whether the underlying class has any methods that are
annotated (or meta-annotated) with the given annotation type.
| |||||||||||
Determine whether the underlying class has an annotation of the given
type defined.
| |||||||||||
Determine whether the underlying class has an annotation that
is itself annotated with the meta-annotation of the given type.
| |||||||||||
Determine whether the underlying class has an annotation or
meta-annotation of the given type defined.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.core.type.StandardClassMetadata
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.core.type.AnnotationMetadata
| |||||||||||
From interface
org.springframework.core.type.ClassMetadata
|
Create a new StandardAnnotationMetadata wrapper for the given Class.
introspectedClass | the Class to introspect |
---|
Retrieve the method metadata for all methods that are annotated (or meta-annotated) with the given annotation type.
For any returned method, isAnnotated(String)
will
return true
for the given annotation type.
annotationType | the annotation type to look for |
---|
MethodMetadata
for methods that have a matching
annotation. The return value will be an empty set if no methods match
the annotation type.
Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying class, as direct annotation or as meta-annotation).
annotationType | the annotation type to look for |
---|
null
if no matching annotation is defined.
Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying class, as direct annotation or as meta-annotation).
annotationType | the annotation type to look for |
---|---|
classValuesAsString | whether to convert class references to String class names for exposure as values in the returned Map, instead of Class references which might potentially have to be loaded first |
null
if no matching annotation is defined.
Return the names of all annotation types defined on the underlying class.
Return the names of all meta-annotation types defined on the given annotation type of the underlying class.
annotationType | the meta-annotation type to look for |
---|
Determine whether the underlying class has any methods that are annotated (or meta-annotated) with the given annotation type.
Determine whether the underlying class has an annotation of the given type defined.
annotationType | the annotation type to look for |
---|
Determine whether the underlying class has an annotation that is itself annotated with the meta-annotation of the given type.
annotationType | the meta-annotation type to look for |
---|
Determine whether the underlying class has an annotation or meta-annotation of the given type defined.
This is equivalent to a "hasAnnotation || hasMetaAnnotation"
check. If this method returns true
, then
getAnnotationAttributes(String)
will return a non-null Map.
annotationType | the annotation type to look for |
---|