|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator
public class AnnotationAwareAspectJAutoProxyCreator
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
DefaultAdvisorAutoProxyCreator
.
AspectJAdvisorFactory
,
Serialized FormField Summary |
---|
Fields inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator |
---|
DO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
AnnotationAwareAspectJAutoProxyCreator()
|
Method Summary | |
---|---|
protected List |
findCandidateAdvisors()
Find all candidate advisors to use in auto-proxying. |
protected void |
initBeanFactory(ConfigurableListableBeanFactory beanFactory)
|
protected boolean |
isEligibleAspectBean(String beanName)
Check whether the given aspect bean is eligible for auto-proxying. |
protected boolean |
isInfrastructureClass(Class beanClass)
Return whether the given bean class represents an infrastructure class that should never be proxied. |
void |
setAspectJAdvisorFactory(AspectJAdvisorFactory aspectJAdvisorFactory)
|
void |
setIncludePatterns(List<String> patterns)
Set a list of regex patterns, matching eligible @AspectJ bean names. |
Methods inherited from class org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator |
---|
extendAdvisors, sortAdvisors |
Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator |
---|
findEligibleAdvisors, getAdvicesAndAdvisorsForBean, isEligibleAdvisorBean, setBeanFactory |
Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator |
---|
buildAdvisors, createProxy, customizeProxyFactory, getBeanFactory, getCacheKey, getCustomTargetSource, getOrder, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setBeanClassLoader, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, setOrder, shouldProxyTargetClass, shouldSkip |
Methods inherited from class org.springframework.aop.framework.ProxyConfig |
---|
copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AnnotationAwareAspectJAutoProxyCreator()
Method Detail |
---|
public void setIncludePatterns(List<String> patterns)
Default is to consider all @AspectJ beans as eligible.
public void setAspectJAdvisorFactory(AspectJAdvisorFactory aspectJAdvisorFactory)
protected void initBeanFactory(ConfigurableListableBeanFactory beanFactory)
initBeanFactory
in class AbstractAdvisorAutoProxyCreator
protected List findCandidateAdvisors()
AbstractAdvisorAutoProxyCreator
findCandidateAdvisors
in class AbstractAdvisorAutoProxyCreator
protected boolean isInfrastructureClass(Class beanClass)
AbstractAutoProxyCreator
Default implementation considers Advisors, Advices and AbstractAutoProxyCreators as infrastructure classes.
isInfrastructureClass
in class AbstractAutoProxyCreator
beanClass
- the class of the bean
Advisor
,
MethodInterceptor
,
AbstractAutoProxyCreator.shouldSkip(java.lang.Class, java.lang.String)
protected boolean isEligibleAspectBean(String beanName)
If no <aop:include> elements were used then "includePatterns" will be
null
and all beans are included. If "includePatterns" is non-null,
then one of the patterns must match.
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |