List of usage examples for org.apache.shiro.aop AnnotationMethodInterceptor getHandler
public AnnotationHandler getHandler()
From source file:fathom.shiro.aop.AopModule.java
License:Apache License
protected final void bindShiroInterceptor(final AnnotationMethodInterceptor methodInterceptor) { bindInterceptor(Matchers.any(), new AbstractMatcher<Method>() { public boolean matches(Method method) { Class<? extends Annotation> annotation = methodInterceptor.getHandler().getAnnotationClass(); return method.getAnnotation(annotation) != null || method.getDeclaringClass().getAnnotation(annotation) != null; }/*from www . j a v a2s.com*/ }, new AopAllianceMethodInterceptorAdapter(methodInterceptor)); }
From source file:org.killbill.billing.util.glue.KillBillShiroAopModule.java
License:Apache License
protected final void bindShiroInterceptorWithHierarchy(final AnnotationMethodInterceptor methodInterceptor) { bindInterceptor(Matchers.any(), new AbstractMatcher<Method>() { public boolean matches(final Method method) { final Class<? extends Annotation> annotation = methodInterceptor.getHandler().getAnnotationClass(); return resolver.getAnnotationFromMethod(method, annotation) != null; }//from w ww .j a v a 2 s. co m }, new AopAllianceMethodInterceptorAdapter(methodInterceptor)); }