com.google.gwt.user.server.rpc.impl
Class SerializabilityUtil

java.lang.Object
  extended by com.google.gwt.user.server.rpc.impl.SerializabilityUtil

public class SerializabilityUtil
extends java.lang.Object

Serialization utility class used by the server-side RPC code.


Field Summary
static java.lang.String DEFAULT_ENCODING
           
static java.util.Comparator<java.lang.reflect.Field> FIELD_COMPARATOR
          Comparator used to sort fields.
 
Constructor Summary
SerializabilityUtil()
           
 
Method Summary
static java.lang.reflect.Field[] applyFieldSerializationPolicy(java.lang.Class<?> clazz)
          Returns the fields of a particular class that can be considered for serialization.
static SerializedInstanceReference decodeSerializedInstanceReference(java.lang.String encodedSerializedInstanceReference)
           
static java.lang.String encodeSerializedInstanceReference(java.lang.Class<?> instanceType, SerializationPolicy policy)
           
static java.lang.String getSerializationSignature(java.lang.Class<?> instanceType, SerializationPolicy policy)
           
static java.lang.String getSerializedTypeName(java.lang.Class<?> instanceType)
           
static java.lang.Class<?> hasCustomFieldSerializer(java.lang.Class<?> instanceType)
          Returns the Class which can serialize the given instance type, or null if this class has no custom field serializer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values

FIELD_COMPARATOR

public static final java.util.Comparator<java.lang.reflect.Field> FIELD_COMPARATOR
Comparator used to sort fields.

Constructor Detail

SerializabilityUtil

public SerializabilityUtil()
Method Detail

applyFieldSerializationPolicy

public static java.lang.reflect.Field[] applyFieldSerializationPolicy(java.lang.Class<?> clazz)
Returns the fields of a particular class that can be considered for serialization. The returned list will be sorted into a canonical order to ensure consistent answers. TODO: this method needs a better name, I think.


decodeSerializedInstanceReference

public static SerializedInstanceReference decodeSerializedInstanceReference(java.lang.String encodedSerializedInstanceReference)

encodeSerializedInstanceReference

public static java.lang.String encodeSerializedInstanceReference(java.lang.Class<?> instanceType,
                                                                 SerializationPolicy policy)

getSerializationSignature

public static java.lang.String getSerializationSignature(java.lang.Class<?> instanceType,
                                                         SerializationPolicy policy)

getSerializedTypeName

public static java.lang.String getSerializedTypeName(java.lang.Class<?> instanceType)

hasCustomFieldSerializer

public static java.lang.Class<?> hasCustomFieldSerializer(java.lang.Class<?> instanceType)
Returns the Class which can serialize the given instance type, or null if this class has no custom field serializer. Note that arrays never have custom field serializers.