|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.object.SimpleToolboxObjectFactory
public class SimpleToolboxObjectFactory
Simple factory implementation to abstract the required dynamic class loading and instantiation code.
Constructor Summary | |
---|---|
SimpleToolboxObjectFactory()
Default constructor. |
Method Summary | |
---|---|
java.lang.Object |
newInstance(java.lang.Class clazz)
Create a new instance of the given class. |
java.lang.Object |
newInstance(java.lang.String clazz)
Create a new instance of the given class. |
java.lang.Object |
newInstance(java.lang.String clazz,
java.lang.ClassLoader loader)
Create a new instance of the given class using the provided ClassLoader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleToolboxObjectFactory()
Method Detail |
---|
public java.lang.Object newInstance(java.lang.String clazz) throws java.lang.Exception
newInstance
in interface ToolboxObjectFactory
clazz
- String containing the name of the class.
java.lang.Exception
- if the Object cannot be created.public java.lang.Object newInstance(java.lang.Class clazz) throws java.lang.Exception
newInstance
in interface ToolboxObjectFactory
clazz
- Class instance.
java.lang.Exception
- if the Object cannot be created.public java.lang.Object newInstance(java.lang.String clazz, java.lang.ClassLoader loader) throws java.lang.Exception
newInstance
in interface ToolboxObjectFactory
clazz
- String containing the name of the class.loader
- ClassLoader to use when creating the Object instance.
java.lang.Exception
- if the Object cannot be created.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |