|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.rpc.CustomFieldSerializer<T>
T
- the type of the object being serializedpublic abstract class CustomFieldSerializer<T>
An interface that may be implemented by class-based custom field serializers which will reduce the amount of server-side reflection during serialization, hence improving their serialization performance.
Constructor Summary | |
---|---|
CustomFieldSerializer()
|
Method Summary | |
---|---|
abstract void |
deserializeInstance(SerializationStreamReader streamReader,
T instance)
Deserializes the content of the object from the SerializationStreamReader . |
boolean |
hasCustomInstantiateInstance()
|
T |
instantiateInstance(SerializationStreamReader streamReader)
Instantiates an object from the SerializationStreamReader . |
abstract void |
serializeInstance(SerializationStreamWriter streamWriter,
T instance)
Serializes the content of the object into the SerializationStreamWriter . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CustomFieldSerializer()
Method Detail |
---|
public abstract void deserializeInstance(SerializationStreamReader streamReader, T instance) throws SerializationException
SerializationStreamReader
.
streamReader
- the SerializationStreamReader
to read the
object's content frominstance
- the object instance to deserialize
SerializationException
- if the deserialization operation is not
successfulpublic boolean hasCustomInstantiateInstance()
true
if a specialist instantiateInstance(com.google.gwt.user.client.rpc.SerializationStreamReader)
is
implemented; false
otherwisepublic T instantiateInstance(SerializationStreamReader streamReader) throws SerializationException
SerializationStreamReader
.
Most of the time, this can be left unimplemented and the framework will instantiate the instance itself. This is typically used when the object being deserialized is immutable, hence it has to be created with its state already set.
If this is overridden, the hasCustomInstantiateInstance()
method
must return true
in order for the framework to know to call
it.
streamReader
- the SerializationStreamReader
to read the
object's content from
SerializationStreamReader
SerializationException
- if the instantiation operation is not
successfulpublic abstract void serializeInstance(SerializationStreamWriter streamWriter, T instance) throws SerializationException
SerializationStreamWriter
.
streamWriter
- the SerializationStreamWriter
to write the
object's content toinstance
- the object instance to serialize
SerializationException
- if the serialization operation is not
successful
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |