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

public Class ConstructorInstantiator<T>

extends Object
implements ObjectInstantiator<T>
Class Inheritance
All Implemented Interfaces
org.springframework.objenesis.instantiator.ObjectInstantiator
Known Direct Subclasses
org.springframework.objenesis.instantiator.basic.AccessibleInstantiator
Annotations
@Instantiator:NOT_COMPLIANT
Type Parameters
<T>
Type instantiated
Imports
java.lang.reflect.Constructor, org.springframework.objenesis.ObjenesisException, org.springframework.objenesis.instantiator.ObjectInstantiator, org.springframework.objenesis.instantiator.annotations.Instantiator, .Typology

Instantiates a class by grabbing the no args constructor and calling Constructor.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
protected Constructor<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Field Detail

constructorback to summary
protected Constructor<T> constructor

Constructor Detail

ConstructorInstantiatorback to summary
public ConstructorInstantiator(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.