Package org.objenesis.instantiator.basic
Class NewInstanceInstantiator<T>
java.lang.Object
org.objenesis.instantiator.basic.NewInstanceInstantiator<T>
- All Implemented Interfaces:
ObjectInstantiator<T>
@Instantiator(NOT_COMPLIANT)
public class NewInstanceInstantiator<T>
extends Object
implements ObjectInstantiator<T>
The simplest instantiator - simply calls Class.newInstance(). This can deal with default public
constructors, but that's about it.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NewInstanceInstantiator
-
-
Method Details
-
newInstance
Description copied from interface:ObjectInstantiator
Returns a new instance of an object. The returned object's class is defined by the implementation.- Specified by:
newInstance
in interfaceObjectInstantiator<T>
- Returns:
- A new instance of an object.
-