Save This Page
Home » Spring-Framework-090522 » org.springframework » aop » aspectj » autoproxy » [javadoc | source]
org.springframework.aop.aspectj.autoproxy
public class: AspectJAwareAdvisorAutoProxyCreator [javadoc | source]
java.lang.Object
   org.springframework.aop.framework.ProxyConfig
      org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
         org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
            org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator

All Implemented Interfaces:
    Ordered, BeanClassLoaderAware, AopInfrastructureBean, SmartInstantiationAwareBeanPostProcessor, BeanFactoryAware, Serializable

Direct Known Subclasses:
    AnnotationAwareAspectJAutoProxyCreator

org.springframework.aop.framework.autoproxy.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.
Fields inherited from org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator:
DO_NOT_PROXY,  PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS,  logger
Fields inherited from org.springframework.aop.framework.ProxyConfig:
opaque,  exposeProxy
Method from org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator Summary:
extendAdvisors,   shouldSkip,   sortAdvisors
Methods from org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator:
advisorsPreFiltered,   extendAdvisors,   findAdvisorsThatCanApply,   findCandidateAdvisors,   findEligibleAdvisors,   getAdvicesAndAdvisorsForBean,   initBeanFactory,   isEligibleAdvisorBean,   setBeanFactory,   sortAdvisors
Methods from org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator:
advisorsPreFiltered,   buildAdvisors,   createProxy,   customizeProxyFactory,   determineCandidateConstructors,   getAdvicesAndAdvisorsForBean,   getBeanFactory,   getCacheKey,   getCustomTargetSource,   getEarlyBeanReference,   getOrder,   isFrozen,   isInfrastructureClass,   isInfrastructureClass,   postProcessAfterInitialization,   postProcessAfterInstantiation,   postProcessBeforeInitialization,   postProcessBeforeInstantiation,   postProcessPropertyValues,   predictBeanType,   setAdvisorAdapterRegistry,   setApplyCommonInterceptorsFirst,   setBeanClassLoader,   setBeanFactory,   setCustomTargetSourceCreators,   setFrozen,   setInterceptorNames,   setOrder,   setProxyClassLoader,   shouldProxyTargetClass,   shouldSkip,   wrapIfNecessary
Methods from org.springframework.aop.framework.ProxyConfig:
copyFrom,   isExposeProxy,   isFrozen,   isOpaque,   isOptimize,   isProxyTargetClass,   setExposeProxy,   setFrozen,   setOpaque,   setOptimize,   setProxyTargetClass,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator Detail:
 protected  void extendAdvisors(List candidateAdvisors) 
    Adds an ExposeInvocationInterceptor to the beginning of the advice chain. These additional advices are needed when using AspectJ expression pointcuts and when using AspectJ-style advice.
 protected boolean shouldSkip(Class beanClass,
    String beanName) 
 protected List sortAdvisors(List advisors) 
    Sort the rest by AspectJ precedence. If two pieces of advice have 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 (runs last)
    • otherwise the advice declared first gets highest precedence (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.