|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InstantiationStrategy
Interface responsible for creating instances corresponding to a root bean definition.
This is pulled out into a strategy as various approaches are possible, including using CGLIB to create subclasses on the fly to support Method Injection.
Method Summary | |
---|---|
Object |
instantiate(RootBeanDefinition beanDefinition,
String beanName,
BeanFactory owner)
Return an instance of the bean with the given name in this factory. |
Object |
instantiate(RootBeanDefinition beanDefinition,
String beanName,
BeanFactory owner,
Constructor ctor,
Object[] args)
Return an instance of the bean with the given name in this factory, creating it via the given constructor. |
Object |
instantiate(RootBeanDefinition beanDefinition,
String beanName,
BeanFactory owner,
Object factoryBean,
Method factoryMethod,
Object[] args)
Return an instance of the bean with the given name in this factory, creating it via the given factory method. |
Method Detail |
---|
Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner)
beanDefinition
- the 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
Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner, Constructor ctor, Object[] args)
beanDefinition
- the 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
Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner, Object factoryBean, Method factoryMethod, Object[] args)
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 BeanFactoryfactoryBean
- the factory bean instance to call the factory method on,
or null
in case of a static factory methodfactoryMethod
- 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 |