|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.beans.factory.support.SimpleInstantiationStrategy
Simple object instantiation strategy for use in BeanFactories.
Does not support Method Injection, although it provides hooks for subclasses to override to add Method Injection support, for example by overriding methods.
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
SimpleInstantiationStrategy()
|
Method Summary | |
java.lang.Object |
instantiate(RootBeanDefinition beanDefinition,
java.lang.String beanName,
BeanFactory owner)
Return an instance of the bean with the given name in this factory. |
java.lang.Object |
instantiate(RootBeanDefinition beanDefinition,
java.lang.String beanName,
BeanFactory owner,
java.lang.reflect.Constructor ctor,
java.lang.Object[] args)
Return an instance of the bean with the given name in this factory, creating it via the given constructor. |
java.lang.Object |
instantiate(RootBeanDefinition beanDefinition,
java.lang.String beanName,
BeanFactory owner,
java.lang.reflect.Method factoryMethod,
java.lang.Object[] args)
Return an instance of the bean with the given name in this factory, creating it via the given factory method. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public SimpleInstantiationStrategy()
Method Detail |
public java.lang.Object instantiate(RootBeanDefinition beanDefinition, java.lang.String beanName, BeanFactory owner)
InstantiationStrategy
instantiate
in interface InstantiationStrategy
beanDefinition
- bean definitionbeanName
- name of the bean when it's created in this context.
The name can be null if we're autowiring a bean that doesn't
belong to the factory.owner
- owning BeanFactory
protected java.lang.Object instantiateWithMethodInjection(RootBeanDefinition beanDefinition, java.lang.String beanName, BeanFactory owner)
public java.lang.Object instantiate(RootBeanDefinition beanDefinition, java.lang.String beanName, BeanFactory owner, java.lang.reflect.Constructor ctor, java.lang.Object[] args)
InstantiationStrategy
instantiate
in interface InstantiationStrategy
beanDefinition
- bean definitionbeanName
- name of the bean when it's created in this context.
The name can be null if we're autowiring a bean that doesn't
belong to the factory.owner
- owning BeanFactoryctor
- the constructor to useargs
- the constructor arguments to apply
protected java.lang.Object instantiateWithMethodInjection(RootBeanDefinition beanDefinition, java.lang.String beanName, BeanFactory owner, java.lang.reflect.Constructor ctor, java.lang.Object[] args)
public java.lang.Object instantiate(RootBeanDefinition beanDefinition, java.lang.String beanName, BeanFactory owner, java.lang.reflect.Method factoryMethod, java.lang.Object[] args)
InstantiationStrategy
instantiate
in interface InstantiationStrategy
beanDefinition
- bean definitionbeanName
- name of the bean when it's created in this context.
The name can be null if we're autowiring a bean that doesn't
belong to the factory.owner
- owning BeanFactoryfactoryMethod
- the factory method to useargs
- the factory method arguments to apply
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |