类 AspectJAwareAdvisorAutoProxyCreator

所有已实现的接口:
AopInfrastructureBean, ProxyCreator, infra.beans.factory.Aware, infra.beans.factory.BeanClassLoaderAware, infra.beans.factory.BeanFactoryAware, infra.beans.factory.config.BeanPostProcessor, infra.beans.factory.config.InstantiationAwareBeanPostProcessor, infra.beans.factory.config.SmartInstantiationAwareBeanPostProcessor, infra.beans.factory.DisposableBean, infra.beans.factory.InitializationBeanPostProcessor, infra.beans.factory.SmartInitializingSingleton, infra.core.Ordered, Serializable
直接已知子类:
AnnotationAwareAspectJAutoProxyCreator

public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator implements infra.beans.factory.SmartInitializingSingleton, infra.beans.factory.DisposableBean
AbstractAdvisorAutoProxyCreator subclass that exposes AspectJ's invocation context and understands AspectJ's rules for advice precedence when multiple pieces of advice come from the same aspect.
从以下版本开始:
4.0
作者:
Adrian Colyer, Juergen Hoeller, Ramnivas Laddad, Harry Yang
另请参阅:
  • 字段详细资料

    • DEFAULT_PRECEDENCE_COMPARATOR

      private static final Comparator<Advisor> DEFAULT_PRECEDENCE_COMPARATOR
  • 构造器详细资料

    • AspectJAwareAdvisorAutoProxyCreator

      public AspectJAwareAdvisorAutoProxyCreator()
  • 方法详细资料

    • sortAdvisors

      protected List<Advisor> sortAdvisors(List<Advisor> advisors)
      Sort the supplied Advisor instances according to AspectJ precedence.

      If two pieces of advice come from the same aspect, they will have the same order. Advice from the same aspect is then further ordered according to the following rules:

      • If either of the pair is after advice, then the advice declared last gets highest precedence (i.e., runs last).
      • Otherwise the advice declared first gets highest precedence (i.e., runs first).

      Important: Advisors are sorted in precedence order, from highest precedence to lowest. "On the way in" to a join point, the highest precedence advisor should run first. "On the way out" of a join point, the highest precedence advisor should run last.

      覆盖:
      sortAdvisors 在类中 AbstractAdvisorAutoProxyCreator
      参数:
      advisors - the source List of Advisors
      返回:
      the sorted List of Advisors
      另请参阅:
      • Ordered
      • Order
      • AnnotationAwareOrderComparator
    • extendAdvisors

      protected void extendAdvisors(List<Advisor> candidateAdvisors)
      Add an ExposeInvocationInterceptor to the beginning of the advice chain.

      This additional advice is needed when using AspectJ pointcut expressions and when using AspectJ-style advice.

      覆盖:
      extendAdvisors 在类中 AbstractAdvisorAutoProxyCreator
      参数:
      candidateAdvisors - the Advisors that have already been identified as applying to a given bean
    • shouldSkip

      protected boolean shouldSkip(Class<?> beanClass, String beanName)
      从类复制的说明: AbstractAutoProxyCreator
      Subclasses should override this method to return true if the given bean should not be considered for auto-proxying by this post-processor.

      Sometimes we need to be able to avoid this happening, for example, if it will lead to a circular reference or if the existing target instance needs to be preserved. This implementation returns false unless the bean name indicates an "original instance" according to AutowireCapableBeanFactory conventions.

      覆盖:
      shouldSkip 在类中 AbstractAutoProxyCreator
      参数:
      beanClass - the class of the bean
      beanName - the name of the bean
      返回:
      whether to skip the given bean
      另请参阅:
      • AutowireCapableBeanFactory.ORIGINAL_INSTANCE_SUFFIX
    • afterSingletonsInstantiated

      public void afterSingletonsInstantiated()
      指定者:
      afterSingletonsInstantiated 在接口中 infra.beans.factory.SmartInitializingSingleton
    • destroy

      public void destroy() throws Exception
      指定者:
      destroy 在接口中 infra.beans.factory.DisposableBean
      抛出:
      Exception