|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension of the BeanFactory interface to be implemented by bean factories that are capable of autowiring and expose this functionality for existing bean instances.
Field Summary | |
static int |
AUTOWIRE_AUTODETECT
Constant that indicates determining an appropriate autowire strategy through introspection of the bean class. |
static int |
AUTOWIRE_BY_NAME
Constant that indicates autowiring by name. |
static int |
AUTOWIRE_BY_TYPE
Constant that indicates autowiring by type. |
static int |
AUTOWIRE_CONSTRUCTOR
Constant that indicates autowiring a constructor. |
Method Summary | |
java.lang.Object |
applyBeanPostProcessorsAfterInitialization(java.lang.Object existingBean,
java.lang.String name)
Apply BeanPostProcessors to the given existing bean instance, invoking their postProcessAfterInitialization methods. |
java.lang.Object |
applyBeanPostProcessorsBeforeInitialization(java.lang.Object existingBean,
java.lang.String name)
Apply BeanPostProcessors to the given existing bean instance, invoking their postProcessBeforeInitialization methods. |
java.lang.Object |
autowire(java.lang.Class beanClass,
int autowireMode,
boolean dependencyCheck)
Create a new bean instance of the given class with the specified autowire strategy. |
void |
autowireBeanProperties(java.lang.Object existingBean,
int autowireMode,
boolean dependencyCheck)
Autowire the bean properties of the given bean instance by name or type. |
Methods inherited from interface org.springframework.beans.factory.BeanFactory |
containsBean, getAliases, getBean, getBean, isSingleton |
Field Detail |
public static final int AUTOWIRE_BY_NAME
autowire(java.lang.Class, int, boolean)
,
autowireBeanProperties(java.lang.Object, int, boolean)
,
Constant Field Valuespublic static final int AUTOWIRE_BY_TYPE
autowire(java.lang.Class, int, boolean)
,
autowireBeanProperties(java.lang.Object, int, boolean)
,
Constant Field Valuespublic static final int AUTOWIRE_CONSTRUCTOR
autowire(java.lang.Class, int, boolean)
,
Constant Field Valuespublic static final int AUTOWIRE_AUTODETECT
autowire(java.lang.Class, int, boolean)
,
Constant Field ValuesMethod Detail |
public java.lang.Object autowire(java.lang.Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException
beanClass
- the class of the bean to instantiateautowireMode
- by name or type, using the constants in this interfacedependencyCheck
- whether to perform a dependency check for objects
(not applicable to autowiring a constructor, thus ignored there)
BeansException
- if instantiation respectively wiring failedAUTOWIRE_BY_NAME
,
AUTOWIRE_BY_TYPE
,
AUTOWIRE_CONSTRUCTOR
,
AUTOWIRE_AUTODETECT
public void autowireBeanProperties(java.lang.Object existingBean, int autowireMode, boolean dependencyCheck) throws BeansException
existingBean
- the existing bean instanceautowireMode
- by name or type, using the constants in this interfacedependencyCheck
- whether to perform a dependency check for object
BeansException
- if wiring failedAUTOWIRE_BY_NAME
,
AUTOWIRE_BY_TYPE
public java.lang.Object applyBeanPostProcessorsBeforeInitialization(java.lang.Object existingBean, java.lang.String name) throws BeansException
existingBean
- the new bean instancename
- the name of the bean
BeansException
- if any post-processing failedBeanPostProcessor.postProcessBeforeInitialization(java.lang.Object, java.lang.String)
public java.lang.Object applyBeanPostProcessorsAfterInitialization(java.lang.Object existingBean, java.lang.String name) throws BeansException
existingBean
- the new bean instancename
- the name of the bean
BeansException
- if any post-processing failedBeanPostProcessor.postProcessAfterInitialization(java.lang.Object, java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |