org.easymock.internal
Class DefaultClassInstantiator
java.lang.Object
org.easymock.internal.DefaultClassInstantiator
- All Implemented Interfaces:
- IClassInstantiator
public class DefaultClassInstantiator
- extends Object
- implements IClassInstantiator
Default class instantiator that is pretty limited. It just hope that the
mocked class has a public empty constructor.
- Author:
- Henri Tremblay
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultClassInstantiator
public DefaultClassInstantiator()
newInstance
public Object newInstance(Class<?> c)
throws InstantiationException
- Try to instantiate a class without using a special constructor. See
documentation for the algorithm.
- Specified by:
newInstance
in interface IClassInstantiator
- Parameters:
c
- Class to instantiate
- Returns:
- new instance of clazz
- Throws:
InstantiationException
Copyright © 2001-2011 OFFIS, Tammo Freese, Henri Tremblay. All Rights Reserved.