IClassInstantiator
public class DefaultClassInstantiator extends Object implements IClassInstantiator
Constructor | Description |
---|---|
DefaultClassInstantiator() |
Modifier and Type | Method | Description |
---|---|---|
Object[] |
getArgsForTypes(Class<?>[] methodTypes) |
Get some default instances of provided classes
|
Constructor<?> |
getConstructorToUse(Class<?> clazz) |
Return the constructor considered the best to use with this class.
|
Object |
newInstance(Class<?> c) |
Try to instantiate a class without using a special constructor.
|
public Object newInstance(Class<?> c) throws InstantiationException
newInstance
in interface IClassInstantiator
c
- Class to instantiateInstantiationException
- when an error occured during instantiationpublic Constructor<?> getConstructorToUse(Class<?> clazz)
clazz
- Class in which constructor is searchedpublic Object[] getArgsForTypes(Class<?>[] methodTypes) throws InstantiationException
methodTypes
- Classes to instantiateInstantiationException
- Thrown if the class instantiation failsCopyright © 2001–2018 EasyMock contributors. All rights reserved.