org.objenesis
Interface Objenesis

All Known Implementing Classes:
ObjenesisBase, ObjenesisSerializer, ObjenesisStd

public interface Objenesis

Common interface to all kind of Objenesis objects


Method Summary
 ObjectInstantiator getInstantiatorOf(java.lang.Class clazz)
          Will pick the best instantiator for the provided class.
 java.lang.Object newInstance(java.lang.Class clazz)
          Will create a new object without any constructor being called
 

Method Detail

newInstance

java.lang.Object newInstance(java.lang.Class clazz)
Will create a new object without any constructor being called

Parameters:
clazz - Class to instantiate
Returns:
New instance of clazz

getInstantiatorOf

ObjectInstantiator getInstantiatorOf(java.lang.Class clazz)
Will pick the best instantiator for the provided class. If you need to create a lot of instances from the same class, it is way more efficient to create them from the same ObjectInstantiator than calling newInstance(Class).

Parameters:
clazz - Class to instantiate
Returns:
Instantiator dedicated to the class