org.easymock.classextension.internal
Class ObjenesisClassInstantiator

java.lang.Object
  extended by org.easymock.classextension.internal.ObjenesisClassInstantiator
All Implemented Interfaces:
IClassInstantiator

public class ObjenesisClassInstantiator
extends java.lang.Object
implements IClassInstantiator


Constructor Summary
ObjenesisClassInstantiator()
           
 
Method Summary
 java.lang.Object newInstance(java.lang.Class<?> clazz)
          Return a new instance of the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjenesisClassInstantiator

public ObjenesisClassInstantiator()
Method Detail

newInstance

public java.lang.Object newInstance(java.lang.Class<?> clazz)
                             throws java.lang.InstantiationException
Description copied from interface: IClassInstantiator
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.

Specified by:
newInstance in interface IClassInstantiator
Returns:
new instance of clazz
Throws:
java.lang.InstantiationException


Copyright © 2009. All Rights Reserved.