Top Description Fields Constructors Methods
org.springframework.objenesis.instantiator.basic

public Class NewInstanceInstantiator<T>

extends Object
implements ObjectInstantiator<T>
Class Inheritance
All Implemented Interfaces
org.springframework.objenesis.instantiator.ObjectInstantiator
Annotations
@Instantiator:NOT_COMPLIANT
Imports
org.springframework.objenesis.instantiator.ObjectInstantiator, org.springframework.objenesis.instantiator.annotations.Instantiator, .Typology, org.springframework.objenesis.instantiator.util.ClassUtils

The simplest instantiator - simply calls Class.newInstance(). This can deal with default public constructors, but that's about it.
Author
Joe Walnes
See Also
ObjectInstantiator

Field Summary

Modifier and TypeField and Description
private final Class<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeback to summary
private final Class<T> type

Constructor Detail

NewInstanceInstantiatorback to summary
public NewInstanceInstantiator(Class<T> type)

Method Detail

newInstanceback to summary
public T newInstance()

Implements org.springframework.objenesis.instantiator.ObjectInstantiator.newInstance.

Doc from org.springframework.objenesis.instantiator.ObjectInstantiator.newInstance.

Returns a new instance of an object. The returned object's class is defined by the implementation.

Returns:T

A new instance of an object.