org.springframework.config.java.process
Class ConfigurationPostProcessor

java.lang.Object
  extended by org.springframework.config.java.process.ConfigurationPostProcessor
All Implemented Interfaces:
BeanFactoryPostProcessor, ApplicationContextAware, ResourceLoaderAware, Ordered

public class ConfigurationPostProcessor
extends Object
implements BeanFactoryPostProcessor, Ordered, ResourceLoaderAware, ApplicationContextAware

Post processor for use in a bean factory that can process multiple configuration beans. See the ConfigurationProcessor class's documentation for the semantics of a Configuration bean.

In the BeanFactoryPostProcessor implementation, this class adds factory bean definitions for every Configuration bean found in the bean factory. It also creates a child factory containing pointcuts and advisors required to interpret Pointcut attributes.

Author:
Rod Johnson, Costin Leau
See Also:
ConfigurationProcessor, Bean, Configuration

Field Summary
protected  Log log
           
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
ConfigurationPostProcessor()
           
 
Method Summary
 int getOrder()
          Guarantee to execute before any other BeanFactoryPostProcessors
 void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
          Generate BeanDefinitions and add them to factory for each Configuration bean.
 void setApplicationContext(ApplicationContext ac)
           
 void setConfigurationListenerRegistry(org.springframework.config.java.process.ConfigurationListenerRegistry configurationListenerRegistry)
          The listener registry used by this factory bean.
 void setNamingStrategy(BeanNamingStrategy namingStrategy)
          BeanNamingStrategy used for generating the bean definitions.
 void setResourceLoader(ResourceLoader resourceLoader)
          Optional implementation of ResourceLoaderAware
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final Log log
Constructor Detail

ConfigurationPostProcessor

public ConfigurationPostProcessor()
Method Detail

getOrder

public int getOrder()
Guarantee to execute before any other BeanFactoryPostProcessors

Specified by:
getOrder in interface Ordered

setConfigurationListenerRegistry

public void setConfigurationListenerRegistry(org.springframework.config.java.process.ConfigurationListenerRegistry configurationListenerRegistry)
The listener registry used by this factory bean. Initially, DefaultConfigurationListenerRegistry is used.

Parameters:
configurationListenerRegistry - The configurationListenerRegistry to set.

setNamingStrategy

public void setNamingStrategy(BeanNamingStrategy namingStrategy)
BeanNamingStrategy used for generating the bean definitions.

Parameters:
namingStrategy - The namingStrategy to set.

setResourceLoader

public void setResourceLoader(ResourceLoader resourceLoader)
Optional implementation of ResourceLoaderAware

Specified by:
setResourceLoader in interface ResourceLoaderAware

setApplicationContext

public void setApplicationContext(ApplicationContext ac)
                           throws BeansException
Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException

postProcessBeanFactory

public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
                            throws BeansException
Generate BeanDefinitions and add them to factory for each Configuration bean.

Specified by:
postProcessBeanFactory in interface BeanFactoryPostProcessor
Throws:
BeansException


Copyright � 2005-2008 Spring Framework. All Rights Reserved.