Package org.objenesis.strategy
Class SerializingInstantiatorStrategy
- java.lang.Object
-
- org.objenesis.strategy.BaseInstantiatorStrategy
-
- org.objenesis.strategy.SerializingInstantiatorStrategy
-
- All Implemented Interfaces:
InstantiatorStrategy
public class SerializingInstantiatorStrategy extends BaseInstantiatorStrategy
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- JVM version
- JVM vendor
- JVM vendor version
- See Also:
ObjectInstantiator
-
-
Constructor Summary
Constructors Constructor Description SerializingInstantiatorStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> ObjectInstantiator<T>
newInstantiatorOf(java.lang.Class<T> type)
Return anObjectInstantiator
allowing to create instance following the java serialization framework specifications.
-
-
-
Method Detail
-
newInstantiatorOf
public <T> ObjectInstantiator<T> newInstantiatorOf(java.lang.Class<T> type)
Return anObjectInstantiator
allowing to create instance following the java serialization framework specifications.- Type Parameters:
T
- Type to instantiate- Parameters:
type
- Class to instantiate- Returns:
- The ObjectInstantiator for the class
-
-