Package org.apache.shiro.spring.aop
Class SpringAnnotationResolver
- java.lang.Object
-
- org.apache.shiro.spring.aop.SpringAnnotationResolver
-
- All Implemented Interfaces:
AnnotationResolver
public class SpringAnnotationResolver extends Object implements AnnotationResolver
AnnotationResolver
implementation that uses Spring's more robustAnnotationUtils
to find method annotations instead of the JDKs simpler (and rather lacking)Method
.getAnnotation(class)
implementation.- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description SpringAnnotationResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Annotation
getAnnotation(MethodInvocation mi, Class<? extends Annotation> clazz)
Returns anAnnotation
instance of the specified type based on the givenMethodInvocation
argument, ornull
if no annotation of that type could be found.
-
-
-
Constructor Detail
-
SpringAnnotationResolver
public SpringAnnotationResolver()
-
-
Method Detail
-
getAnnotation
public Annotation getAnnotation(MethodInvocation mi, Class<? extends Annotation> clazz)
Description copied from interface:AnnotationResolver
Returns anAnnotation
instance of the specified type based on the givenMethodInvocation
argument, ornull
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.- Specified by:
getAnnotation
in interfaceAnnotationResolver
- Parameters:
mi
- the intercepted method to be invoked.clazz
- the annotation class of the annotation to find.- Returns:
- the method's annotation of the specified type or
null
if no annotation of that type could be found.
-
-