|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Allows for custom instantiation of beans, e.g. to suppress default instantiation for specific beans, to create proxies, etc.
FacesWebApplication contexts can auto-detect InstantiationProcessor beans in
their bean definitions and apply them before any other beans get created.
Plain bean factories of type
ConfigurableBeanFactory allow for
programmatic registration of instantiation-processors.
ConfigurableBeanFactory.addInstantiationProcessor(InstantiationProcessor),
AbstractFacesWebApplicationContext,
ConfigurableInstantiationStrategy| Method Summary | |
java.lang.Object |
processBeforeInstantiation(java.lang.Class beanClass,
java.lang.String beanName,
java.lang.reflect.Constructor ctor,
java.lang.Object[] args)
Applied before the target bean gets instantiated. |
| Method Detail |
public java.lang.Object processBeforeInstantiation(java.lang.Class beanClass,
java.lang.String beanName,
java.lang.reflect.Constructor ctor,
java.lang.Object[] args)
If a non-null object is returned by this method, the bean instantiation process will be short-circuited.
This callback will only be applied to bean definitions with a bean class. In particular, it will not be applied to beans with a "factory-method".
beanClass - the class of the bean to be instantiatedbeanName - the name of the beanctor - the constructor of the bean to be used for instantiationargs - the constructor arguments of the bean to be used for
instantiation
null when this
instantiation processor is not responsible for instantiation
BeansException - on instantiation errors
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||