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.
| Modifier and Type | Field and Description |
|---|---|
| private final Object[] | iArgs
The constructor arguments |
| private final Class | iClassToInstantiate
The class to create |
| private transient Constructor | iConstructor
The constructor |
| private final Class | iParamTypes
The constructor parameter types |
| Access | Constructor and Description |
|---|---|
| public | InstantiateFactory(final Class<T>
the class to instantiate classToInstantiate)Constructor that performs no validation. |
| public | InstantiateFactory(final Class<T>
the class to instantiate classToInstantiate, final Class<?>[] the constructor parameter types, cloned paramTypes, final Object[] the constructor arguments, cloned args)Constructor that performs no validation. |
| Modifier and Type | Method and Description |
|---|---|
| public T | Returns: the new objectImplements org. |
| private void | |
| public static < the type the factory creates T> Factory | Returns: a new instantiate factorythe class to instantiate, not null classToInstantiate, final Class<?>[] the constructor parameter types, cloned paramTypes, final Object[] the constructor arguments, cloned args)Factory method that performs validation. |
| iArgs | back to summary |
|---|---|
| private final Object[] iArgs The constructor arguments | |
| iClassToInstantiate | back to summary |
|---|---|
| private final Class<T> iClassToInstantiate The class to create | |
| iConstructor | back to summary |
|---|---|
| private transient Constructor<T> iConstructor The constructor | |
| iParamTypes | back to summary |
|---|---|
| private final Class<?>[] iParamTypes The constructor parameter types | |
| InstantiateFactory | back to summary |
|---|---|
| public InstantiateFactory(final Class<T> classToInstantiate) Constructor that performs no validation.
Use
| |
| InstantiateFactory | back to summary |
|---|---|
| public InstantiateFactory(final Class<T> classToInstantiate, final Class<?>[] paramTypes, final Object[] args) Constructor that performs no validation.
Use | |
| create | back to summary |
|---|---|
| public T create() Implements org. Creates an object using the stored constructor.
| |
| findConstructor | back to summary |
|---|---|
| private void findConstructor() Find the Constructor for the class specified. | |
| instantiateFactory | back to summary |
|---|---|
| public static <T> Factory Factory method that performs validation.
| |