IClassInstantiatorpublic class DefaultClassInstantiator extends java.lang.Object implements IClassInstantiator
| Constructor | Description |
|---|---|
DefaultClassInstantiator() |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object[] |
getArgsForTypes(java.lang.Class<?>[] methodTypes) |
Get some default instances of provided classes
|
java.lang.reflect.Constructor<?> |
getConstructorToUse(java.lang.Class<?> clazz) |
Return the constructor considered the best to use with this class.
|
java.lang.Object |
newInstance(java.lang.Class<?> c) |
Try to instantiate a class without using a special constructor.
|
public java.lang.Object newInstance(java.lang.Class<?> c)
throws java.lang.InstantiationException
newInstance in interface IClassInstantiatorc - Class to instantiatejava.lang.InstantiationException - when an error occured during instantiationpublic java.lang.reflect.Constructor<?> getConstructorToUse(java.lang.Class<?> clazz)
clazz - Class in which constructor is searchedpublic java.lang.Object[] getArgsForTypes(java.lang.Class<?>[] methodTypes)
throws java.lang.InstantiationException
methodTypes - Classes to instantiatejava.lang.InstantiationException - Thrown if the class instantiation failsCopyright © 2001-2019 EasyMock contributors. This documentation is provided under the terms of the Apache 2 licence.