public class SpringAnnotationResolver extends Object implements AnnotationResolver
AnnotationResolver implementation that uses Spring's more robust
AnnotationUtils to find method annotations instead of the JDKs simpler
(and rather lacking) Method.getAnnotation(class)
implementation.| Constructor and Description |
|---|
SpringAnnotationResolver() |
| Modifier and Type | Method and Description |
|---|---|
Annotation |
getAnnotation(MethodInvocation mi,
Class<? extends Annotation> clazz)
Returns an
Annotation instance of the specified type based on the given
MethodInvocation argument, or null if no annotation
of that type could be found. |
public Annotation getAnnotation(MethodInvocation mi, Class<? extends Annotation> clazz)
AnnotationResolverAnnotation instance of the specified type based on the given
MethodInvocation argument, or null if no annotation
of that type could be found. First checks the invoked method itself and if not found,
then the class for the existence of the same annotation.getAnnotation in interface AnnotationResolvermi - the intercepted method to be invoked.clazz - the annotation class of the annotation to find.null if no annotation of
that type could be found.Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.