public class

LegacySerializationPolicy

extends SerializationPolicy
implements TypeNameObfuscator
java.lang.Object
   ↳ com.google.gwt.user.server.rpc.SerializationPolicy
     ↳ com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy

Class Overview

A serialization policy compatible with GWT 1.3.3 RPC. This is used when no serialization policy file is present.

The set of allowed types are:

  1. Primitives
  2. Types assignable to IsSerializable
  3. Types with custom field serializers
  4. Arrays of the above types

Types that derive from Serializable but do not meet any of the above criteria may not be serialized as leaf types. However, their fields may be serialized as super types of a legal type.

Summary

[Expand]
Inherited Constants
From interface com.google.gwt.user.server.rpc.impl.TypeNameObfuscator
Public Methods
final String getClassNameForTypeId(String id)
Implemented to fail with a useful error message.
static LegacySerializationPolicy getInstance()
final String getTypeIdForClass(Class<?> clazz)
Implemented to fail with a useful error message.
boolean shouldDeserializeFields(Class<?> clazz)
Returns true if the class' fields should be deserialized.
boolean shouldSerializeFields(Class<?> clazz)
Returns true if the class' fields should be serialized.
void validateDeserialize(Class<?> clazz)
Validates that the specified class should be deserialized from a stream.
void validateSerialize(Class<?> clazz)
Validates that the specified class should be serialized into a stream.
[Expand]
Inherited Methods
From class com.google.gwt.user.server.rpc.SerializationPolicy
From class java.lang.Object
From interface com.google.gwt.user.server.rpc.impl.TypeNameObfuscator

Public Methods

public final String getClassNameForTypeId (String id)

Implemented to fail with a useful error message.

Parameters
id the type id that was present in the RPC payload
Returns
  • the name of the class, suitable for use by forName(String), to be instantiated

public static LegacySerializationPolicy getInstance ()

public final String getTypeIdForClass (Class<?> clazz)

Implemented to fail with a useful error message.

Parameters
clazz the class to be transmitted
Returns
  • the obfuscated type identifier.

public boolean shouldDeserializeFields (Class<?> clazz)

Returns true if the class' fields should be deserialized.

Parameters
clazz the class to test
Returns
  • true if the class' fields should be deserialized

public boolean shouldSerializeFields (Class<?> clazz)

Returns true if the class' fields should be serialized.

Parameters
clazz the class to test
Returns
  • true if the class' fields should be serialized

public void validateDeserialize (Class<?> clazz)

Validates that the specified class should be deserialized from a stream.

Parameters
clazz the class to validate

public void validateSerialize (Class<?> clazz)

Validates that the specified class should be serialized into a stream.

Parameters
clazz the class to validate