@Instantiator(value=SERIALIZATION) public class AndroidSerializationInstantiator<T> extends java.lang.Object implements ObjectInstantiator<T>
ObjectInstantiator
for Android which creates objects using the constructor from the first
non-serializable parent class constructor, using internal methods on the Dalvik implementation of
ObjectStreamClass
.Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
newInstanceMethod |
private java.io.ObjectStreamClass |
objectStreamClass |
private java.lang.Class<T> |
type |
Constructor and Description |
---|
AndroidSerializationInstantiator(java.lang.Class<T> type) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.reflect.Method |
getNewInstanceMethod() |
T |
newInstance()
Returns a new instance of an object.
|
private final java.lang.Class<T> type
private final java.io.ObjectStreamClass objectStreamClass
private final java.lang.reflect.Method newInstanceMethod
public AndroidSerializationInstantiator(java.lang.Class<T> type)
public T newInstance()
ObjectInstantiator
newInstance
in interface ObjectInstantiator<T>
private static java.lang.reflect.Method getNewInstanceMethod()