Polishing

This commit is contained in:
Juergen Hoeller
2014-02-09 00:45:55 +01:00
parent 61ab40cd7a
commit c3d74b4521

View File

@@ -40,8 +40,13 @@ import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.Assert;
/**
* Enhances {@link Configuration} classes by generating a CGLIB subclass capable of
* interacting with the Spring container to respect bean semantics.
* Enhances {@link Configuration} classes by generating a CGLIB subclass which
* interacts with the Spring container to respect bean scoping semantics for
* {@code @Bean} methods. Each such {@code @Bean} method will be overridden in
* the generated subclass, only delegating to the actual {@code @Bean} method
* implementation if the container actually requests the construction of a new
* instance. Otherwise, a call to such an {@code @Bean} method serves as a
* reference back to the container, obtaining the corresponding bean by name.
*
* @author Chris Beams
* @author Juergen Hoeller
@@ -104,7 +109,7 @@ class ConfigurationClassEnhancer {
private Enhancer newEnhancer(Class<?> superclass) {
Enhancer enhancer = new Enhancer();
enhancer.setSuperclass(superclass);
enhancer.setInterfaces(new Class<?>[]{EnhancedConfiguration.class});
enhancer.setInterfaces(new Class<?>[] {EnhancedConfiguration.class});
enhancer.setUseFactory(false);
enhancer.setNamingPolicy(SpringNamingPolicy.INSTANCE);
enhancer.setCallbackFilter(CALLBACK_FILTER);