Top Description Constructors Methods
org.springframework.objenesis.strategy

public Class SerializingInstantiatorStrategy

extends BaseInstantiatorStrategy
Class Inheritance
Imports
java.io.NotSerializableException, .Serializable, org.springframework.objenesis.ObjenesisException, org.springframework.objenesis.instantiator.ObjectInstantiator, org.springframework.objenesis.instantiator.android.AndroidSerializationInstantiator, org.springframework.objenesis.instantiator.basic.ObjectInputStreamInstantiator, .ObjectStreamClassInstantiator, org.springframework.objenesis.instantiator.gcj.GCJSerializationInstantiator, org.springframework.objenesis.instantiator.perc.PercSerializationInstantiator, org.springframework.objenesis.instantiator.sun.SunReflectionFactorySerializationInstantiator

Guess the best serializing instantiator for a given class. The returned instantiator will instantiate classes like the genuine java serialization framework (the constructor of the first not serializable class will be called). Currently, the selection doesn't depend on the class. It relies on the However, instantiators are stateful and so dedicated to their class.
Author
Henri Tremblay
See Also
ObjectInstantiator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <T> ObjectInstantiator<T>

Returns:

The ObjectInstantiator for the class
newInstantiatorOf
(Class<T>
Class to instantiate
type
)

Implements org.springframework.objenesis.strategy.InstantiatorStrategy.newInstantiatorOf.

Return an ObjectInstantiator allowing to create instance following the java serialization framework specifications.

Constructor Detail

SerializingInstantiatorStrategyback to summary
public SerializingInstantiatorStrategy()

Method Detail

newInstantiatorOfback to summary
public <T> ObjectInstantiator<T> newInstantiatorOf(Class<T> type)

Implements org.springframework.objenesis.strategy.InstantiatorStrategy.newInstantiatorOf.

Return an ObjectInstantiator allowing to create instance following the java serialization framework specifications.

Parameters
<T>

Doc from org.springframework.objenesis.strategy.InstantiatorStrategy.newInstantiatorOf. Type to instantiate

type:Class<T>

Class to instantiate

Returns:ObjectInstantiator<T>

The ObjectInstantiator for the class