org.springframework.config.java.listener.aop
Class SpringAdviceConfigurationListener
java.lang.Object
org.springframework.config.java.listener.ConfigurationListenerSupport
org.springframework.config.java.listener.aop.AbstractAopConfigurationListener
org.springframework.config.java.listener.aop.SpringAdviceConfigurationListener
- All Implemented Interfaces:
- ConfigurationListener
public class SpringAdviceConfigurationListener
- extends AbstractAopConfigurationListener
Configuration class to create a Spring Advisor containing an AspectJ pointcut
and the Spring advice returned by the method.
Usage:
@SpringAdvice("expression")
protected Advice returnsSpringAdvice() { ... }
It is possible to specify an advice that will match everything as follows:
@SpringAdvice(matchAll=true)
protected Advice returnsSpringAdvice() { ... }
- Author:
- Rod Johnson
Method Summary |
int |
beanCreationMethod(ConfigurationListener.BeanDefinitionRegistration beanDefinitionRegistration,
org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
org.springframework.beans.factory.support.DefaultListableBeanFactory childBeanFactory,
java.lang.String configurerBeanName,
java.lang.Class configurerClass,
java.lang.reflect.Method m,
Bean beanAnnotation)
React to the BeanDefinition and possibly customize it or change its name |
protected org.springframework.aop.Pointcut |
createSpringPointcut(SpringAdvice ann,
java.lang.reflect.Method method)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringAdviceConfigurationListener
public SpringAdviceConfigurationListener()
beanCreationMethod
public int beanCreationMethod(ConfigurationListener.BeanDefinitionRegistration beanDefinitionRegistration,
org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
org.springframework.beans.factory.support.DefaultListableBeanFactory childBeanFactory,
java.lang.String configurerBeanName,
java.lang.Class configurerClass,
java.lang.reflect.Method m,
Bean beanAnnotation)
- Description copied from interface:
ConfigurationListener
- React to the BeanDefinition and possibly customize it or change its name
- Specified by:
beanCreationMethod
in interface ConfigurationListener
- Overrides:
beanCreationMethod
in class ConfigurationListenerSupport
- Parameters:
beanDefinitionRegistration
- bean definition registration
informationbeanFactory
- factory owning the configuration class. This method
will be called before beans are instantiated, so other objects may not be
available.childBeanFactory
- child bean factory available for internal use,
such as for registering infrastructural beansconfigurerBeanName
- bean name of the configurer classconfigurerClass
- configurer classm
- configuration methodbeanAnnotation
- bean annotation on the configuration method, which
will not be null.
- Returns:
- number of additional bean definitions created for the existing one. The value should be different from zero if wrapping bean definitions
are created besides the normal @Bean discovery process
createSpringPointcut
protected org.springframework.aop.Pointcut createSpringPointcut(SpringAdvice ann,
java.lang.reflect.Method method)
Copyright © 2005-2007 Spring Framework. All Rights Reserved.