Package com.ultikits.ultitools.aop
Class AopAdvisor.AnnotationAopAdvisor
java.lang.Object
com.ultikits.ultitools.aop.AopAdvisor.AnnotationAopAdvisor
- All Implemented Interfaces:
AopAdvisor
- Enclosing interface:
AopAdvisor
Internal implementation for annotation-based advisors.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ultikits.ultitools.aop.AopAdvisor
AopAdvisor.AnnotationAopAdvisor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<? extends Annotation> private final MethodInterceptorprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationAopAdvisor(Class<? extends Annotation> annotationType, MethodInterceptor interceptor, int order) -
Method Summary
Modifier and TypeMethodDescriptionGets the interceptor to apply for matching methods.intgetOrder()Gets the order of this advisor.booleanDetermines if this advisor applies to the given method.
-
Field Details
-
annotationType
-
interceptor
-
order
private final int order
-
-
Constructor Details
-
AnnotationAopAdvisor
AnnotationAopAdvisor(Class<? extends Annotation> annotationType, MethodInterceptor interceptor, int order)
-
-
Method Details
-
matches
Description copied from interface:AopAdvisorDetermines if this advisor applies to the given method.- Specified by:
matchesin interfaceAopAdvisor- Parameters:
method- the method to checktargetClass- the class declaring the method- Returns:
- true if this advisor should intercept the method
-
getInterceptor
Description copied from interface:AopAdvisorGets the interceptor to apply for matching methods.- Specified by:
getInterceptorin interfaceAopAdvisor- Returns:
- the method interceptor
-
getOrder
public int getOrder()Description copied from interface:AopAdvisorGets the order of this advisor. Lower values have higher priority.Default order is 0. Transaction advisors typically use order 100, exception handling uses order 200.
- Specified by:
getOrderin interfaceAopAdvisor- Returns:
- the order value
-