sf.qof.util
Class ObjectInstantiator
java.lang.Object
sf.qof.util.ObjectInstantiator
public final class ObjectInstantiator
- extends Object
Helper class to instantiate an object.
Method Summary |
static
|
newInstance(Class<T> clazz,
Object[] initArgs)
Creates a new instance of clazz using the given parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newInstance
public static <T> T newInstance(Class<T> clazz,
Object[] initArgs)
- Creates a new instance of
clazz
using the given parameters.
If no constructor for the given parameters can be found in
clazz
an exception is thrown.
- Type Parameters:
T
- object type- Parameters:
clazz
- class typeinitArgs
- constructor arguments
- Returns:
- an instance of clazz
- Throws:
RuntimeException
- instanziation failed
Copyright © 2007 brunella ltd. All Rights Reserved.