Class AopAdvisor.AnnotationAopAdvisor

java.lang.Object
com.ultikits.ultitools.aop.AopAdvisor.AnnotationAopAdvisor
All Implemented Interfaces:
AopAdvisor
Enclosing interface:
AopAdvisor

public static class AopAdvisor.AnnotationAopAdvisor extends Object implements AopAdvisor
Internal implementation for annotation-based advisors.
  • Field Details

    • annotationType

      private final Class<? extends Annotation> annotationType
    • interceptor

      private final MethodInterceptor interceptor
    • order

      private final int order
  • Constructor Details

  • Method Details

    • matches

      public boolean matches(Method method, Class<?> targetClass)
      Description copied from interface: AopAdvisor
      Determines if this advisor applies to the given method.
      Specified by:
      matches in interface AopAdvisor
      Parameters:
      method - the method to check
      targetClass - the class declaring the method
      Returns:
      true if this advisor should intercept the method
    • getInterceptor

      public MethodInterceptor getInterceptor()
      Description copied from interface: AopAdvisor
      Gets the interceptor to apply for matching methods.
      Specified by:
      getInterceptor in interface AopAdvisor
      Returns:
      the method interceptor
    • getOrder

      public int getOrder()
      Description copied from interface: AopAdvisor
      Gets 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:
      getOrder in interface AopAdvisor
      Returns:
      the order value