| org.springframework.beans.factory.SmartFactoryBean
All known Subclasses: org.springframework.beans.factory.config.BeanReferenceFactoryBean,
SmartFactoryBean | public interface SmartFactoryBean extends FactoryBean(Code) | | Extension of the
FactoryBean interface. Implementations may
indicate whether they always return independent instances, for the
case where their
SmartFactoryBean.isSingleton() implementation returning
false does not clearly indicate independent instances.
Plain
FactoryBean implementations which do not implement
this extended interface are simply assumed to always return independent
instances if their
SmartFactoryBean.isSingleton() implementation returns
false .
NOTE: This interface is a special purpose interface, mainly for
internal use within the framework. In general, application-provided
FactoryBeans should simply implement the plain
FactoryBean interface.
author: Juergen Hoeller since: 2.0.3 See Also: SmartFactoryBean.isPrototype() See Also: SmartFactoryBean.isSingleton() |
Method Summary | |
boolean | isPrototype() Is the object managed by this factory a prototype? That is,
will
SmartFactoryBean.getObject() always return an independent instance?
The prototype status of the FactoryBean itself will generally
be provided by the owning
BeanFactory ; usually, it has to be
defined as singleton there.
This method is supposed to strictly check for independent instances;
it should not return true for scoped objects or other
kinds of non-singleton, non-independent objects. |
isPrototype | boolean isPrototype()(Code) | | Is the object managed by this factory a prototype? That is,
will
SmartFactoryBean.getObject() always return an independent instance?
The prototype status of the FactoryBean itself will generally
be provided by the owning
BeanFactory ; usually, it has to be
defined as singleton there.
This method is supposed to strictly check for independent instances;
it should not return true for scoped objects or other
kinds of non-singleton, non-independent objects. For this reason,
this is not simply the inverted form of
SmartFactoryBean.isSingleton() .
if the exposed object is a prototype See Also: SmartFactoryBean.getObject() See Also: SmartFactoryBean.isSingleton() |
|
|