spring-framework / org.springframework.aop.config / AbstractInterceptorDrivenBeanDefinitionDecorator

AbstractInterceptorDrivenBeanDefinitionDecorator

abstract class AbstractInterceptorDrivenBeanDefinitionDecorator : BeanDefinitionDecorator

Base implementation for org.springframework.beans.factory.xml.BeanDefinitionDecorator wishing to add an org.aopalliance.intercept.MethodInterceptor 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 org.springframework.beans.factory.xml.BeanDefinitionDecorator already created the org.springframework.aop.framework.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.

Author
Rob Harrop

Author
Juergen Hoeller

Since
2.0

See Also
org.aopalliance.intercept.MethodInterceptor

Constructors

<init>

AbstractInterceptorDrivenBeanDefinitionDecorator()

Base implementation for org.springframework.beans.factory.xml.BeanDefinitionDecorator wishing to add an org.aopalliance.intercept.MethodInterceptor 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 org.springframework.beans.factory.xml.BeanDefinitionDecorator already created the org.springframework.aop.framework.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.

Functions

decorate

fun decorate(node: Node, definitionHolder: BeanDefinitionHolder, parserContext: ParserContext): BeanDefinitionHolder