|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.util.Factories.SimpleObjectFactory<E>
public static final class Factories.SimpleObjectFactory<E>
A simple factory that creates objects of the type of the class provided, providing it has an empty constructor
| Constructor Summary | |
|---|---|
Factories.SimpleObjectFactory(java.lang.Class<E> clazz)
Construct a new SimpleObjectFactory for the no-args constructor of the provided type |
|
Factories.SimpleObjectFactory(java.lang.Class<E> clazz,
java.lang.Class<?>[] classargs,
java.lang.Object[] args)
Construct a new SimpleObjectFactory for the constructor that matches the types provided |
|
Factories.SimpleObjectFactory(java.lang.Class<E> clazz,
java.lang.Object... args)
Construct a new SimpleObjectFactory for the constructor that matches the types of provided arguments (arguments must be non-null) |
|
| Method Summary | |
|---|---|
E |
create()
Returns an object of type E. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Factories.SimpleObjectFactory(java.lang.Class<E> clazz)
throws java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
clazz - the type to construct
java.lang.SecurityException - if clazz.getConstructor throws a SecurityException
java.lang.NoSuchMethodException - if a matching constructor is not found
java.lang.InstantiationException - if an object cannot be constructed using the found constructor
java.lang.IllegalAccessException - if the constructor's access is restricted
java.lang.reflect.InvocationTargetException - if the constructor throws an exception
public Factories.SimpleObjectFactory(java.lang.Class<E> clazz,
java.lang.Object... args)
throws java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
clazz - the type to constructargs - the arguments to use for the constructor
java.lang.SecurityException - if clazz.getConstructor throws a SecurityException
java.lang.NoSuchMethodException - if a matching constructor is not found
java.lang.InstantiationException - if an object cannot be constructed using the found constructor
java.lang.IllegalAccessException - if the constructor's access is restricted
java.lang.reflect.InvocationTargetException - if the constructor throws an exception
public Factories.SimpleObjectFactory(java.lang.Class<E> clazz,
java.lang.Class<?>[] classargs,
java.lang.Object[] args)
throws java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
clazz - the type to constructclassargs - the types to use to find the constructorargs - the arguments to use for the constructor
java.lang.SecurityException - if clazz.getConstructor throws a SecurityException
java.lang.NoSuchMethodException - if a matching constructor is not found
java.lang.InstantiationException - if an object cannot be constructed using the found constructor
java.lang.IllegalAccessException - if the constructor's access is restricted
java.lang.reflect.InvocationTargetException - if the constructor throws an exception| Method Detail |
|---|
public E create()
FactoryE. This method should be thread-safe.
create in interface Factory<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||