public class InstantiateFactory extends java.lang.Object implements Factory, java.io.Serializable
WARNING: from v3.2.2 onwards this class will throw an
UnsupportedOperationException
when trying to serialize or
de-serialize an instance to prevent potential remote code execution exploits.
In order to re-enable serialization support for InstantiateTransformer
the following system property can be used (via -Dproperty=true):
org.apache.commons.collections.enableUnsafeSerialization
Constructor and Description |
---|
InstantiateFactory(java.lang.Class classToInstantiate)
Constructor that performs no validation.
|
InstantiateFactory(java.lang.Class classToInstantiate,
java.lang.Class[] paramTypes,
java.lang.Object[] args)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
create()
Creates an object using the stored constructor.
|
static Factory |
getInstance(java.lang.Class classToInstantiate,
java.lang.Class[] paramTypes,
java.lang.Object[] args)
Factory method that performs validation.
|
public InstantiateFactory(java.lang.Class classToInstantiate)
getInstance
if you want that.classToInstantiate
- the class to instantiatepublic InstantiateFactory(java.lang.Class classToInstantiate, java.lang.Class[] paramTypes, java.lang.Object[] args)
getInstance
if you want that.classToInstantiate
- the class to instantiateparamTypes
- the constructor parameter types, not clonedargs
- the constructor arguments, not clonedpublic static Factory getInstance(java.lang.Class classToInstantiate, java.lang.Class[] paramTypes, java.lang.Object[] args)
classToInstantiate
- the class to instantiate, not nullparamTypes
- the constructor parameter typesargs
- the constructor argumentsCopyright © 2010 - 2020 Adobe. All Rights Reserved