|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectFactory
Defines a factory which can return an Object instance (possibly shared or independent) when invoked.
This interface is typically used to encapsulate a generic factory which returns a new instance (prototype) of some target object on each invocation.
This interface is similar to FactoryBean, but implementations of the latter
are normally meant to be defined as instances by the user in a BeanFactory,
while implementations of this class are normally meant to be fed as a property
to other beans. As such, the getObject
method has different
exception handling behavior.
FactoryBean
Method Summary | |
---|---|
Object |
getObject()
Return an instance (possibly shared or independent) of the object managed by this factory. |
Method Detail |
---|
Object getObject() throws BeansException
null
)
BeansException
- in case of creation errors
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |