public class InstantiateTransformer<T> extends java.lang.Object implements Transformer<java.lang.Class<? extends T>,T>
WARNING: from v4.1 onwards this class will not be serializable anymore in order to prevent potential remote code execution exploits. Please refer to COLLECTIONS-580 for more details.
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 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 argumentsjava.lang.IllegalArgumentException
- if paramTypes does not match argsCopyright © 2010 - 2020 Adobe. All Rights Reserved