|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the class the instances of which will be created by this Instantiatorpublic interface Instantiator<T>
Interface for creating instances of a given class.
This class provides a convenient way of repeatable creation of instances without the need of repetable inspection of the target class.
Method Summary | |
---|---|
java.lang.Class<? extends T> |
getInstantiatorClass()
Returns the class instantiated by this Instantiator. |
java.lang.Class<?>[] |
getInstantiatorPrototype()
Returns the classes of arguments for the instantiate(java.lang.Object[]) method. |
T |
instantiate(java.lang.Object... arguments)
Creates an instance for the given arguments. |
Method Detail |
---|
T instantiate(java.lang.Object... arguments) throws java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
arguments
- the arguments for the intstance
java.lang.IllegalArgumentException
- if the arguments are not compatible
java.lang.reflect.InvocationTargetException
- if there was an exception thrown when the instance was createdjava.lang.Class<? extends T> getInstantiatorClass()
java.lang.Class<?>[] getInstantiatorPrototype()
instantiate(java.lang.Object[])
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |