类 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
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
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明private static final recordImplements AspectJ'sPartialOrder.PartialComparableinterface for defining partial orderings. -
字段概要
字段从类继承的字段 infra.aop.framework.autoproxy.AbstractAutoProxyCreator
DO_NOT_PROXY, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS从接口继承的字段 infra.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidvoiddestroy()protected voidextendAdvisors(List<Advisor> candidateAdvisors) Add anExposeInvocationInterceptorto the beginning of the advice chain.protected booleanshouldSkip(Class<?> beanClass, String beanName) Subclasses should override this method to returntrueif the given bean should not be considered for auto-proxying by this post-processor.sortAdvisors(List<Advisor> advisors) Sort the suppliedAdvisorinstances according to AspectJ precedence.从类继承的方法 infra.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
advisorsPreFiltered, findAdvisorsThatCanApply, findCandidateAdvisors, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, initBeanFactory, isEligibleAdvisorBean, setBeanFactory从类继承的方法 infra.aop.framework.autoproxy.AbstractAutoProxyCreator
buildAdvisors, createProxy, customizeProxyFactory, determineBeanType, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, getTargetSource, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessBeforeInstantiation, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, wrapIfNecessary从类继承的方法 infra.aop.framework.ProxyProcessorSupport
evaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoader从类继承的方法 infra.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toString从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 infra.beans.factory.InitializationBeanPostProcessor
postProcessBeforeInitialization从接口继承的方法 infra.beans.factory.config.InstantiationAwareBeanPostProcessor
postProcessAfterInstantiation从接口继承的方法 infra.beans.factory.SmartInitializingSingleton
afterSingletonsInstantiated
-
字段详细资料
-
DEFAULT_PRECEDENCE_COMPARATOR
-
-
构造器详细资料
-
AspectJAwareAdvisorAutoProxyCreator
public AspectJAwareAdvisorAutoProxyCreator()
-
-
方法详细资料
-
sortAdvisors
Sort the suppliedAdvisorinstances 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
- 另请参阅:
-
OrderedOrderAnnotationAwareOrderComparator
-
extendAdvisors
Add anExposeInvocationInterceptorto 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
从类复制的说明:AbstractAutoProxyCreatorSubclasses should override this method to returntrueif 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
falseunless the bean name indicates an "original instance" according toAutowireCapableBeanFactoryconventions.- 覆盖:
shouldSkip在类中AbstractAutoProxyCreator- 参数:
beanClass- the class of the beanbeanName- 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
- 指定者:
destroy在接口中infra.beans.factory.DisposableBean- 抛出:
Exception
-