public interface StorageSerializer
Realize:
Object to String serialization,
String to Object deserialization
| Modifier and Type | Method and Description |
|---|---|
<T> T |
deserialize(Class<? super T> clazz,
String serializedString)
Deserialize string to object
The clazz only used by serializer to distinguish primitive type and object type.
|
<T> String |
serialize(Class<? super T> clazz,
T instance)
Serialize object to string
The clazz only used to distinguish primitive type and object type.
|
<T> T deserialize(Class<? super T> clazz, String serializedString) throws com.google.gwt.user.client.rpc.SerializationException
The clazz only used by serializer to distinguish primitive type and object type.
For all primitive types, the clazz should equals to
Otherwise, use Serializable or IsSerializable for
clazz, and real class type for
T - the real class type wanted to returnclazz - the type of the given value to deserialize withserializedString - the serialized string which will be deserialize to its original class typecom.google.gwt.user.client.rpc.SerializationException<T> String serialize(Class<? super T> clazz, T instance) throws com.google.gwt.user.client.rpc.SerializationException
The clazz only used to distinguish primitive type and object type.
For all primitive types, the clazz should equals to
Otherwise, use Serializable or IsSerializable for
clazz, and real class type for
T - the real class type of the given valueclazz - the type of the given value to serialize withinstance - the value which will be serialized to stringcom.google.gwt.user.client.rpc.SerializationExceptionCopyright © 2018 seanchenxi.com. All rights reserved.