org.easymock.classextension.internal
Interface IClassInstantiator

All Known Implementing Classes:
DefaultClassInstantiator, ObjenesisClassInstantiator

public interface IClassInstantiator

Used to instantiate a given class.


Method Summary
 java.lang.Object newInstance(java.lang.Class<?> clazz)
          Return a new instance of the specified class.
 

Method Detail

newInstance

java.lang.Object newInstance(java.lang.Class<?> clazz)
                             throws java.lang.InstantiationException
Return a new instance of the specified class. The recommended way is without calling any constructor. This is usually done by doing like ObjectInputStream.readObject() which is JVM specific.

Parameters:
c - Class to instantiate
Returns:
new instance of clazz
Throws:
java.lang.InstantiationException


Copyright © 2009. All Rights Reserved.