Class AnnotationAwareAspectJAutoProxyCreator
- All Implemented Interfaces:
- Serializable,- AopInfrastructureBean,- Aware,- BeanClassLoaderAware,- BeanFactoryAware,- BeanPostProcessor,- InstantiationAwareBeanPostProcessor,- SmartInstantiationAwareBeanPostProcessor,- Ordered
AspectJAwareAdvisorAutoProxyCreator subclass that processes all AspectJ
 annotation aspects in the current application context, as well as Spring Advisors.
 Any AspectJ annotated classes will automatically be recognized, and their advice applied if Spring AOP's proxy-based model is capable of applying it. This covers method execution joinpoints.
If the <aop:include> element is used, only @AspectJ beans with names matched by an include pattern will be considered as defining aspects to use for Spring auto-proxying.
Processing of Spring Advisors follows the rules established in
 AbstractAdvisorAutoProxyCreator.
- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreatorDO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORSFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionFind all candidate Advisors to use in auto-proxying.protected voidinitBeanFactory(ConfigurableListableBeanFactory beanFactory) protected booleanisEligibleAspectBean(String beanName) Check whether the given aspect bean is eligible for auto-proxying.protected booleanisInfrastructureClass(Class<?> beanClass) Return whether the given bean class represents an infrastructure class that should never be proxied.voidsetAspectJAdvisorFactory(AspectJAdvisorFactory aspectJAdvisorFactory) voidsetIncludePatterns(List<String> patterns) Set a list of regex patterns, matching eligible @AspectJ bean names.Methods inherited from class org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreatorextendAdvisors, shouldSkip, sortAdvisorsMethods inherited from class org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreatoradvisorsPreFiltered, findAdvisorsThatCanApply, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, isEligibleAdvisorBean, setBeanFactoryMethods inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreatorbuildAdvisors, createProxy, customizeProxyFactory, determineBeanType, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, isFrozen, postProcessAfterInitialization, postProcessBeforeInstantiation, postProcessProperties, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, wrapIfNecessaryMethods inherited from class org.springframework.aop.framework.ProxyProcessorSupportevaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoaderMethods inherited from class org.springframework.aop.framework.ProxyConfigcopyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.config.BeanPostProcessorpostProcessBeforeInitializationMethods inherited from interface org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorpostProcessAfterInstantiation
- 
Constructor Details- 
AnnotationAwareAspectJAutoProxyCreatorpublic AnnotationAwareAspectJAutoProxyCreator()
 
- 
- 
Method Details- 
setIncludePatternsSet a list of regex patterns, matching eligible @AspectJ bean names.Default is to consider all @AspectJ beans as eligible. 
- 
setAspectJAdvisorFactory
- 
initBeanFactory- Overrides:
- initBeanFactoryin class- AbstractAdvisorAutoProxyCreator
 
- 
findCandidateAdvisorsDescription copied from class:AbstractAdvisorAutoProxyCreatorFind all candidate Advisors to use in auto-proxying.- Overrides:
- findCandidateAdvisorsin class- AbstractAdvisorAutoProxyCreator
- Returns:
- the List of candidate Advisors
 
- 
isInfrastructureClassDescription copied from class:AbstractAutoProxyCreatorReturn whether the given bean class represents an infrastructure class that should never be proxied.The default implementation considers Advices, Advisors and AopInfrastructureBeans as infrastructure classes. - Overrides:
- isInfrastructureClassin class- AbstractAutoProxyCreator
- Parameters:
- beanClass- the class of the bean
- Returns:
- whether the bean represents an infrastructure class
- See Also:
 
- 
isEligibleAspectBeanCheck whether the given aspect bean is eligible for auto-proxying.If no <aop:include> elements were used then "includePatterns" will be nulland all beans are included. If "includePatterns" is non-null, then one of the patterns must match.
 
-