|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.context.annotation.ConfigurationClassEnhancer
class ConfigurationClassEnhancer
Enhances Configuration classes by generating a CGLIB subclass capable of
interacting with the Spring container to respect bean semantics.
enhance(java.lang.Class>),
ConfigurationClassPostProcessor| Nested Class Summary | |
|---|---|
private static class |
ConfigurationClassEnhancer.BeanMethodInterceptor
Intercepts the invocation of any Bean-annotated methods in order to ensure proper
handling of bean semantics such as scoping and AOP proxying. |
private static class |
ConfigurationClassEnhancer.GetObjectMethodInterceptor
Intercepts calls to FactoryBean.getObject(), delegating to calling
BeanFactory.getBean(String) in order to respect caching / scoping. |
| Field Summary | |
|---|---|
private CallbackFilter |
callbackFilter
|
private java.util.List<Callback> |
callbackInstances
|
private java.util.List<java.lang.Class<? extends Callback>> |
callbackTypes
|
private static Log |
logger
|
| Constructor Summary | |
|---|---|
ConfigurationClassEnhancer(ConfigurableBeanFactory beanFactory)
Creates a new ConfigurationClassEnhancer instance. |
|
| Method Summary | |
|---|---|
private java.lang.Class<?> |
createClass(Enhancer enhancer)
Uses enhancer to generate a subclass of superclass, ensuring that callbackInstances are registered for the new subclass. |
java.lang.Class<?> |
enhance(java.lang.Class<?> configClass)
Loads the specified class and generates a CGLIB subclass of it equipped with container-aware callbacks capable of respecting scoping and other bean semantics. |
private Enhancer |
newEnhancer(java.lang.Class<?> superclass)
Creates a new CGLIB Enhancer instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Log logger
private final java.util.List<Callback> callbackInstances
private final java.util.List<java.lang.Class<? extends Callback>> callbackTypes
private final CallbackFilter callbackFilter
| Constructor Detail |
|---|
public ConfigurationClassEnhancer(ConfigurableBeanFactory beanFactory)
ConfigurationClassEnhancer instance.
| Method Detail |
|---|
public java.lang.Class<?> enhance(java.lang.Class<?> configClass)
private Enhancer newEnhancer(java.lang.Class<?> superclass)
Enhancer instance.
private java.lang.Class<?> createClass(Enhancer enhancer)
callbackInstances are registered for the new subclass.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||