|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.functors.InstantiateTransformer<T>
public class InstantiateTransformer<T>
Transformer implementation that creates a new object instance by reflection.
Field Summary | |
---|---|
static Transformer<Class<?>,?> |
NO_ARG_INSTANCE
Singleton instance that uses the no arg constructor |
Constructor Summary | |
---|---|
InstantiateTransformer(Class<?>[] paramTypes,
Object[] args)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
static
|
instantiateTransformer()
Get a typed no-arg instance. |
|
static
|
instantiateTransformer(Class<?>[] paramTypes,
Object[] args)
Transformer method that performs validation. |
|
T |
transform(Class<? extends T> input)
Transforms the input Class object to a result by instantiation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Transformer<Class<?>,?> NO_ARG_INSTANCE
Constructor Detail |
---|
public InstantiateTransformer(Class<?>[] paramTypes, Object[] args)
instantiateTransformer
if you want that.
Note: from 4.0, the input parameters will be cloned
paramTypes
- the constructor parameter typesargs
- the constructor argumentsMethod Detail |
---|
public static <T> Transformer<Class<? extends T>,T> instantiateTransformer()
T
- the type of the objects to be created
public static <T> Transformer<Class<? extends T>,T> instantiateTransformer(Class<?>[] paramTypes, Object[] args)
T
- the type of the objects to be createdparamTypes
- the constructor parameter typesargs
- the constructor arguments
public T transform(Class<? extends T> input)
transform
in interface Transformer<Class<? extends T>,T>
input
- the input object to transform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |