|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ikokoon.toolkit.ObjectFactory
public abstract class ObjectFactory
This is an abstract factory. Classes are selected for construction according to the best match between the parameters and the solid implementation of the class.
| Method Summary | ||
|---|---|---|
protected static
|
getConstructor(java.lang.Class<E> klass,
java.lang.Object[] allParameters,
java.util.List<java.lang.Object> parameters)
Finds a constructor in a class that has a signature that includes some the parameters in the parameter list on a best match principal. |
|
static
|
getObject(java.lang.Class<E> klass,
java.lang.Object... allParameters)
This method instantiates a class based on the solid implementation class passed as a parameter and the parameters. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <E> E getObject(java.lang.Class<E> klass,
java.lang.Object... allParameters)
E - the desired class to be instanciatedklass - the class to be instanciatedparameters - the parameters for the constructor, these cannot be primitives and the parameters in the constructor have to be objects as well, not
primitives
protected static <E> java.lang.reflect.Constructor<E> getConstructor(java.lang.Class<E> klass,
java.lang.Object[] allParameters,
java.util.List<java.lang.Object> parameters)
klass - the class look for a constructor inallParameters - all the parameters that are available for the constructorparameters - the parameters that were collected for the best match constructor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||