|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An interface factory bean to create an object. This interface decouples the calling process or class from knowing the exactly details of how an object, Java Bean is created or retrieved.
The object factory can create a bean, or it can retrieve
a bean, from say a cache. The choice is reveal by calling
the accessor #isSingleton() . The calling process
can also interrogate the type of object that will be
returned with getObjectType().
NB: This class is the simplest use of the creational pattern FACTORY. Most of the literature on the web or in book demonstrate the pattern with a discriminator.
| Method Summary | |
ContainmentEnum |
getContainmentType()
Returns the containment type that this object factory creates. |
java.lang.Object |
getObject()
Creates or retrieves the object as defined by this factory bean. |
java.lang.Class |
getObjectType()
Returns the type of object that is or will be created. |
| Method Detail |
public java.lang.Object getObject()
throws AssemblyFactoryException
AssemblyFactoryExceptionpublic java.lang.Class getObjectType()
public ContainmentEnum getContainmentType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||