程序包 infra.aop.config
类 AbstractInterceptorDrivenBeanDefinitionDecorator
java.lang.Object
infra.aop.config.AbstractInterceptorDrivenBeanDefinitionDecorator
- 所有已实现的接口:
infra.beans.factory.xml.BeanDefinitionDecorator
public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator
extends Object
implements infra.beans.factory.xml.BeanDefinitionDecorator
Base implementation for
BeanDefinitionDecorators
wishing to add an interceptor
to the resulting bean.
This base class controls the creation of the ProxyFactoryBean bean definition
and wraps the original as an inner-bean definition for the target property
of ProxyFactoryBean.
Chaining is correctly handled, ensuring that only one ProxyFactoryBean definition
is created. If a previous BeanDefinitionDecorator
already created the ProxyFactoryBean then the
interceptor is simply added to the existing definition.
Subclasses have only to create the BeanDefinition to the interceptor that
they wish to add.
- 从以下版本开始:
- 4.0 2022/3/7 19:29
- 作者:
- Rob Harrop, Juergen Hoeller, Harry Yang
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private voidaddInterceptorNameToList(String interceptorName, infra.beans.factory.config.BeanDefinition beanDefinition) protected abstract infra.beans.factory.config.BeanDefinitionSubclasses should implement this method to return theBeanDefinitionfor the interceptor they wish to apply to the bean being decorated.final infra.beans.factory.config.BeanDefinitionHolderdecorate(Node node, infra.beans.factory.config.BeanDefinitionHolder definitionHolder, infra.beans.factory.xml.ParserContext parserContext) protected StringgetInterceptorNameSuffix(infra.beans.factory.config.BeanDefinition interceptorDefinition) private booleanisProxyFactoryBeanDefinition(infra.beans.factory.config.BeanDefinition existingDefinition)
-
构造器详细资料
-
AbstractInterceptorDrivenBeanDefinitionDecorator
public AbstractInterceptorDrivenBeanDefinitionDecorator()
-
-
方法详细资料
-
decorate
public final infra.beans.factory.config.BeanDefinitionHolder decorate(@NonNull Node node, infra.beans.factory.config.BeanDefinitionHolder definitionHolder, infra.beans.factory.xml.ParserContext parserContext) - 指定者:
decorate在接口中infra.beans.factory.xml.BeanDefinitionDecorator
-
addInterceptorNameToList
private void addInterceptorNameToList(String interceptorName, infra.beans.factory.config.BeanDefinition beanDefinition) -
isProxyFactoryBeanDefinition
private boolean isProxyFactoryBeanDefinition(infra.beans.factory.config.BeanDefinition existingDefinition) -
getInterceptorNameSuffix
protected String getInterceptorNameSuffix(infra.beans.factory.config.BeanDefinition interceptorDefinition) -
createInterceptorDefinition
Subclasses should implement this method to return theBeanDefinitionfor the interceptor they wish to apply to the bean being decorated.
-