org.springframework.config.java.enhancement
Interface ConfigurationEnhancer

All Known Implementing Classes:
CglibConfigurationEnhancer

public interface ConfigurationEnhancer

Decorate the given configuration class for usage inside Spring application context.

The returned class will behave correctly with AOP weaving and singleton caching. For example, the original class will return a new instance on every call to a bean() method that has singleton scope. The enhanced class will cache that and also perform AOP weaving.

Author:
Costin Leau, Chris Beams

Method Summary
<T> Class<? extends T>
enhanceConfiguration(Class<T> configurationClass)
          Return an enhanced version of the given configuration instance and class.
 

Method Detail

enhanceConfiguration

<T> Class<? extends T> enhanceConfiguration(Class<T> configurationClass)
Return an enhanced version of the given configuration instance and class.

This interface allows implementations to choose different strategies for enhancement. One option would be directly enhancing the bytecode of configurationClass while another would be to subclass it, CGLib-style. Note that depending on the underlying implementation, certain restrictions may be placed on the class definition. e.g.: a CGLib implementation would disallow final classes/methods, etc.

Parameters:
configurationClass - configuration class - mandatory
Returns:
the enhanced class


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