|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.beans.factory.support.SimpleInstantiationStrategy
org.springframework.beans.factory.support.CglibSubclassingInstantiationStrategy
public class CglibSubclassingInstantiationStrategy
Default object instantiation strategy for use in BeanFactories. Uses CGLIB to generate subclasses dynamically if methods need to be overridden by the container, to implement Method Injection.
Using Method Injection features requires CGLIB on the classpath. However, the core IoC container will still run without CGLIB being available.
Nested Class Summary | |
---|---|
private static class |
CglibSubclassingInstantiationStrategy.CglibSubclassCreator
An inner class so we don't have a CGLIB dependency in core. |
Field Summary | |
---|---|
private static int |
LOOKUP_OVERRIDE
Index in the CGLIB callback array for a method that should be overridden to provide method lookup. |
private static int |
METHOD_REPLACER
Index in the CGLIB callback array for a method that should be overridden using generic Methodreplacer functionality. |
private static int |
PASSTHROUGH
Index in the CGLIB callback array for passthrough behavior, in which case the subclass won't override the original class. |
Constructor Summary | |
---|---|
CglibSubclassingInstantiationStrategy()
|
Method Summary | |
---|---|
protected java.lang.Object |
instantiateWithMethodInjection(RootBeanDefinition beanDefinition,
java.lang.String beanName,
BeanFactory owner)
Subclasses can override this method, which is implemented to throw UnsupportedOperationException, if they can instantiate an object with the Method Injection specified in the given RootBeanDefinition. |
protected java.lang.Object |
instantiateWithMethodInjection(RootBeanDefinition beanDefinition,
java.lang.String beanName,
BeanFactory owner,
java.lang.reflect.Constructor ctor,
java.lang.Object[] args)
Subclasses can override this method, which is implemented to throw UnsupportedOperationException, if they can instantiate an object with the Method Injection specified in the given RootBeanDefinition. |
Methods inherited from class org.springframework.beans.factory.support.SimpleInstantiationStrategy |
---|
getCurrentlyInvokedFactoryMethod, instantiate, instantiate, instantiate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int PASSTHROUGH
private static final int LOOKUP_OVERRIDE
private static final int METHOD_REPLACER
Constructor Detail |
---|
public CglibSubclassingInstantiationStrategy()
Method Detail |
---|
protected java.lang.Object instantiateWithMethodInjection(RootBeanDefinition beanDefinition, java.lang.String beanName, BeanFactory owner)
SimpleInstantiationStrategy
instantiateWithMethodInjection
in class SimpleInstantiationStrategy
protected java.lang.Object instantiateWithMethodInjection(RootBeanDefinition beanDefinition, java.lang.String beanName, BeanFactory owner, java.lang.reflect.Constructor ctor, java.lang.Object[] args)
SimpleInstantiationStrategy
instantiateWithMethodInjection
in class SimpleInstantiationStrategy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |