public class InstantiateTransformer<T> extends java.lang.Object implements Transformer<java.lang.Class<? extends T>,T>, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static Transformer<java.lang.Class<?>,?> |
NO_ARG_INSTANCE
Singleton instance that uses the no arg constructor
|
| Constructor and Description |
|---|
InstantiateTransformer(java.lang.Class<?>[] paramTypes,
java.lang.Object[] args)
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Transformer<java.lang.Class<? extends T>,T> |
instantiateTransformer()
Get a typed no-arg instance.
|
static <T> Transformer<java.lang.Class<? extends T>,T> |
instantiateTransformer(java.lang.Class<?>[] paramTypes,
java.lang.Object[] args)
Transformer method that performs validation.
|
T |
transform(java.lang.Class<? extends T> input)
Transforms the input Class object to a result by instantiation.
|
public static final Transformer<java.lang.Class<?>,?> NO_ARG_INSTANCE
public InstantiateTransformer(java.lang.Class<?>[] paramTypes,
java.lang.Object[] args)
instantiateTransformer if you want that.
Note: from 4.0, the input parameters will be cloned
paramTypes - the constructor parameter typesargs - the constructor argumentspublic static <T> Transformer<java.lang.Class<? extends T>,T> instantiateTransformer()
T - the type of the objects to be createdpublic static <T> Transformer<java.lang.Class<? extends T>,T> instantiateTransformer(java.lang.Class<?>[] paramTypes, java.lang.Object[] args)
T - the type of the objects to be createdparamTypes - the constructor parameter typesargs - the constructor argumentsCopyright © 2001-2013. All Rights Reserved.