类 ReflectiveAspectJAdvisorFactory

java.lang.Object
infra.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
infra.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory
所有已实现的接口:
AspectJAdvisorFactory, Serializable

public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFactory implements Serializable
Factory that can create Framework AOP Advisors given AspectJ classes from classes honoring AspectJ's annotation syntax, using reflection to invoke the corresponding advice methods.
从以下版本开始:
4.0
作者:
Rod Johnson, Adrian Colyer, Juergen Hoeller, Ramnivas Laddad, Phillip Webb, Sam Brannen, Harry Yang
另请参阅:
  • 字段详细资料

    • adviceMethodFilter

      private static final infra.util.ReflectionUtils.MethodFilter adviceMethodFilter
    • adviceMethodComparator

      private static final Comparator<Method> adviceMethodComparator
    • beanFactory

      @Nullable private final infra.beans.factory.BeanFactory beanFactory
  • 构造器详细资料

    • ReflectiveAspectJAdvisorFactory

      public ReflectiveAspectJAdvisorFactory()
      Create a new ReflectiveAspectJAdvisorFactory.
    • ReflectiveAspectJAdvisorFactory

      public ReflectiveAspectJAdvisorFactory(@Nullable infra.beans.factory.BeanFactory beanFactory)
      Create a new ReflectiveAspectJAdvisorFactory, propagating the given BeanFactory to the created AspectJExpressionPointcut instances, for bean pointcut handling as well as consistent ClassLoader resolution.
      参数:
      beanFactory - the BeanFactory to propagate (may be null}
      另请参阅:
  • 方法详细资料

    • getAdvisors

      public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)
      从接口复制的说明: AspectJAdvisorFactory
      Build Framework AOP Advisors for all annotated At-AspectJ methods on the specified aspect instance.
      指定者:
      getAdvisors 在接口中 AspectJAdvisorFactory
      参数:
      aspectInstanceFactory - the aspect instance factory (not the aspect instance itself in order to avoid eager instantiation)
      返回:
      a list of advisors for this class
    • getAdvisorMethods

      private List<Method> getAdvisorMethods(Class<?> aspectClass)
    • getDeclareParentsAdvisor

      @Nullable private Advisor getDeclareParentsAdvisor(Field introductionField)
      Build a DeclareParentsAdvisor for the given introduction field.

      Resulting Advisors will need to be evaluated for targets.

      参数:
      introductionField - the field to introspect
      返回:
      the Advisor instance, or null if not an Advisor
    • getAdvisor

      @Nullable public Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrderInAspect, String aspectName)
      从接口复制的说明: AspectJAdvisorFactory
      Build a Framework AOP Advisor for the given AspectJ advice method.
      指定者:
      getAdvisor 在接口中 AspectJAdvisorFactory
      参数:
      candidateAdviceMethod - the candidate advice method
      aspectInstanceFactory - the aspect instance factory
      declarationOrderInAspect - the declaration order within the aspect
      aspectName - the name of the aspect
      返回:
      null if the method is not an AspectJ advice method or if it is a pointcut that will be used by other advice but will not create a Framework advice in its own right
    • getPointcut

      @Nullable private AspectJExpressionPointcut getPointcut(Method candidateAdviceMethod, Class<?> candidateAspectClass)
    • getAdvice

      @Nullable public Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectFactory, int declarationOrder, String aspectName)
      从接口复制的说明: AspectJAdvisorFactory
      Build a Framework AOP Advice for the given AspectJ advice method.
      指定者:
      getAdvice 在接口中 AspectJAdvisorFactory
      参数:
      candidateAdviceMethod - the candidate advice method
      expressionPointcut - the AspectJ expression pointcut
      aspectFactory - the aspect instance factory
      declarationOrder - the declaration order within the aspect
      aspectName - the name of the aspect
      返回:
      null if the method is not an AspectJ advice method or if it is a pointcut that will be used by other advice but will not create a Framework advice in its own right
      另请参阅: