|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.util.Instantiator<C>
C - the type of object to be instantiated.public class Instantiator<C>
Generic object instantiator. The factory factory.
| Constructor Summary | |
|---|---|
protected |
Instantiator()
Default constructor to allow subclasses to figure out how they want to build their instance. |
|
Instantiator(java.lang.String className)
Create an instantiator for the given class name. |
|
Instantiator(java.lang.String className,
java.lang.ClassLoader cl)
Create an instantiator for the given class name in the given class loader. |
| Method Summary | |
|---|---|
protected C |
createInstance(java.lang.String className)
Create an instance of the given class (expected to be a C). |
protected C |
createInstance(java.lang.String className,
java.lang.ClassLoader cl)
Create an instance of the given class (expected to be a C). |
C |
getInstance()
Get the instantiated instance. |
protected void |
setInstance(C i)
Set the instance. |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Instantiator()
throws java.lang.Exception
java.lang.ExceptionsetInstance(Object)
public Instantiator(java.lang.String className)
throws java.lang.Exception
className - the name of the class to instantiate
java.lang.Exception - if the instance can't be instantiated
public Instantiator(java.lang.String className,
java.lang.ClassLoader cl)
throws java.lang.Exception
className - the name of the class to loadcl - the class loader to use to instantiate the class
java.lang.Exception - if the instance can't be instantiated| Method Detail |
|---|
protected void setInstance(C i)
i - the instance
protected C createInstance(java.lang.String className)
throws java.lang.Exception
className - the name of the class
java.lang.Exception - if the class can't be instantiated
protected C createInstance(java.lang.String className,
java.lang.ClassLoader cl)
throws java.lang.Exception
className - the name of the class
java.lang.Exception - if the class can't be instantiated
public C getInstance()
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||