Subclasses may override the findCandidateAdvisors() method to
return a custom list of Advisors applying to any object. Subclasses can
also override the inherited shouldSkip method to exclude certain
objects from auto-proxying.
Advisors or advices requiring ordering should be annotated with
@Order or implement the
org. interface. This class sorts
advisors using the AnnotationAwareOrderComparator. Advisors that are
not annotated with @Order or don't implement the Ordered
interface will be considered as unordered; they will appear at the end of the
advisor chain in an undefined order.
findCandidateAdvisors
| Modifier and Type | Class and Description |
|---|---|
| private class | AbstractAdvisorAutoProxyCreator.BeanFactoryAdvisorRetrievalHelperAdapter
Subclass of BeanFactoryAdvisorRetrievalHelper that delegates to surrounding AbstractAdvisorAutoProxyCreator facilities. |
| Modifier and Type | Field and Description |
|---|---|
| private BeanFactoryAdvisorRetrievalHelper |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | advisorsPreFiltered()
Overrides org. |
| protected void | extendAdvisors(List<Advisor>
the Advisors that have already been identified as
applying to a given bean candidateAdvisors)Extension hook that subclasses can override to register additional Advisors, given the sorted Advisors obtained to date. |
| protected List | Returns: the List of applicable Advisorsthe candidate Advisors candidateAdvisors, Class<?> the target's bean class beanClass, String the target's bean name beanName)Search the given candidate Advisors to find all Advisors that can apply to the specified bean. |
| protected List | Returns: the List of candidate AdvisorsFind all candidate Advisors to use in auto-proxying. |
| protected List | Returns: the empty List, notnull,
if there are no pointcuts or interceptorsthe clazz to find advisors for beanClass, String the name of the currently proxied bean beanName)Find all eligible Advisors for auto-proxying this class. |
| protected Object[] | getAdvicesAndAdvisorsForBean(Class<?>
the class of the bean to advise beanClass, String the name of the bean beanName, TargetSource the TargetSource returned by the
targetSource)getCustomTargetSource method: may be ignored.
Will be null if no custom target source is in use.Implements abstract org. |
| protected void | |
| protected boolean | Returns: whether the bean is eligiblethe name of the Advisor bean beanName)Return whether the Advisor bean with the given name is eligible for proxying in the first place. |
| public void | setBeanFactory(BeanFactory
owning BeanFactory (never beanFactory)null).
The bean can immediately call methods on the factory.Overrides org. Implements org. |
| protected List | Returns: the sorted List of Advisorsthe source List of Advisors advisors)Sort advisors based on ordering. |
| advisorRetrievalHelper | back to summary |
|---|---|
| private BeanFactoryAdvisorRetrievalHelper advisorRetrievalHelper
| |
| AbstractAdvisorAutoProxyCreator | back to summary |
|---|---|
| public AbstractAdvisorAutoProxyCreator() | |
| advisorsPreFiltered | back to summary |
|---|---|
| protected boolean advisorsPreFiltered() Overrides org. This auto-proxy creator always returns pre-filtered Advisors.
| |
| extendAdvisors | back to summary |
|---|---|
| protected void extendAdvisors(List<Advisor> candidateAdvisors) Extension hook that subclasses can override to register additional Advisors, given the sorted Advisors obtained to date. The default implementation is empty. Typically used to add Advisors that expose contextual information required by some of the later advisors. | |
| findAdvisorsThatCanApply | back to summary |
|---|---|
| protected List Search the given candidate Advisors to find all Advisors that can apply to the specified bean. | |
| findCandidateAdvisors | back to summary |
|---|---|
| protected List Find all candidate Advisors to use in auto-proxying. | |
| findEligibleAdvisors | back to summary |
|---|---|
| protected List Find all eligible Advisors for auto-proxying this class.
| |
| getAdvicesAndAdvisorsForBean | back to summary |
|---|---|
| protected Object[] getAdvicesAndAdvisorsForBean(Class<?> beanClass, String beanName, TargetSource targetSource) Implements abstract org. Doc from org. Return whether the given bean is to be proxied, what additional advices (e.g. AOP Alliance interceptors) and advisors to apply.
| |
| initBeanFactory | back to summary |
|---|---|
| protected void initBeanFactory(ConfigurableListableBeanFactory beanFactory) | |
| isEligibleAdvisorBean | back to summary |
|---|---|
| protected boolean isEligibleAdvisorBean(String beanName) Return whether the Advisor bean with the given name is eligible for proxying in the first place.
| |
| setBeanFactory | back to summary |
|---|---|
| public void setBeanFactory(BeanFactory beanFactory) Overrides org. Implements org. Doc from org. Callback that supplies the owning factory to a bean instance. Invoked after the population of normal bean properties
but before an initialization callback such as
| |
| sortAdvisors | back to summary |
|---|---|
| protected List Sort advisors based on ordering. Subclasses may choose to override this method to customize the sorting strategy.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | isEligibleBean(String
the name of the aspect bean beanName)Overrides org. |
| BeanFactoryAdvisorRetrievalHelperAdapter | back to summary |
|---|---|
| public BeanFactoryAdvisorRetrievalHelperAdapter(ConfigurableListableBeanFactory beanFactory) | |
| isEligibleBean | back to summary |
|---|---|
| protected boolean isEligibleBean(String beanName) Overrides org. Doc from org. Determine whether the aspect bean with the given name is eligible. The default implementation always returns | |