|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--voji.utils.Instance
This class holds parameters for the constructor of a class. However, an instance will only be created if needed.
| Field Summary | |
protected java.lang.reflect.Constructor |
constructor
The constructor which is to be used |
protected java.lang.Object |
instance
The instance or null if the instance hasn't been created yet |
protected java.lang.Object[] |
params
The parameters which have to be passed to the constructor |
| Constructor Summary | |
Instance()
Constructs a new empty Instance instance |
|
Instance(java.lang.Class cl,
java.lang.Object[] params)
Constructs a new Instance instance
holding an instance of the given Class. |
|
| Method Summary | |
protected java.lang.Object |
create()
Creates the instance. |
java.lang.Object |
get()
Returns the instance and creates it, if necessary |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.reflect.Constructor constructor
protected java.lang.Object[] params
protected java.lang.Object instance
null if the instance hasn't been created yet
| Constructor Detail |
public Instance()
Instance instance
public Instance(java.lang.Class cl,
java.lang.Object[] params)
Instance instance
holding an instance of the given Class.
cl - The Class which has to be instantiatedparams - An Array containing the parameters
of the constructor which has to be used| Method Detail |
protected java.lang.Object create()
public java.lang.Object get()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||