|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.annotation.AnnotationUtils
public abstract class AnnotationUtils
General utility methods for working with annotations.
Constructor Summary | |
---|---|
AnnotationUtils()
|
Method Summary | ||
---|---|---|
static
|
findAnnotation(Method method,
Class<A> annotationType)
Get a single Annotation of annotationType from the
supplied Method . |
|
static
|
getAnnotation(Method method,
Class<A> annotationType)
Get a single Annotation of annotationType from the
supplied Method . |
|
static Annotation[] |
getAnnotations(Method method)
Get all Annotations from the supplied Method . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationUtils()
Method Detail |
---|
public static Annotation[] getAnnotations(Method method)
Annotations
from the supplied Method
.
Correctly handles bridge Methods
generated by the compiler.
method
- the method to look for annotations onBridgeMethodResolver.findBridgedMethod(Method)
public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationType)
Annotation
of annotationType
from the
supplied Method
.
Correctly handles bridge Methods
generated by the compiler.
method
- the method to look for annotations onannotationType
- the annotation class to look forBridgeMethodResolver.findBridgedMethod(Method)
public static <A extends Annotation> A findAnnotation(Method method, Class<A> annotationType)
Annotation
of annotationType
from the
supplied Method
.
Annotations on methods are not inherited by default, so we need to handle this explicitly.
method
- the method to look for annotations onannotationType
- the annotation class to look for
null
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |