com.google.gwt.user.rebind.rpc
Interface SerializableTypeOracle


public interface SerializableTypeOracle

Interface implemented by any class that wants to answer questions about serializable types.


Method Summary
 JField[] applyFieldSerializationPolicy(JType type)
           
 SerializedInstanceReference decodeSerializedInstanceReference(String encodedSerializedInstanceReference)
          Decode a serialized instance reference into its components.
 String encodeSerializedInstanceReference(JType instanceType)
          Creates a string that represents a serialized instance reference from a qualified type name.
 JMethod getCustomFieldSerializerInstantiateMethodForType(JType type)
          Returns the instantiate method on a custom field serializer if there is one and it is valid or null if there is not.
 String getFieldSerializerName(JType type)
          Return the name of the field serializer for a particular type.
 JType[] getSerializableTypes()
          Returns the list of all types that are considered serializable.
 JType[] getSerializableTypesAssignableTo(JType type)
          Get the set of serializable types that are assignable to the requested class, interface, primitive, parameterized, or array type.
 String getSerializationSignature(JType instanceType)
          Generate a signature for a type from a fully qualified type name.
 String getSerializedTypeName(JType type)
          Return the serialized name of a type.
 String getTypeSerializerQualifiedName(JClassType serviceIntf)
          Return the qualified name of the type serializer class for the given service interface.
 String getTypeSerializerSimpleName(JClassType serviceIntf)
          Return the simple name of the type serializer class for the given service interface interface.
 JClassType hasCustomFieldSerializer(JType type)
          Return a custom field serializer if there is one associated with a type.
 boolean isSerializable(JType type)
          Return true if the type is serializable.
 

Method Detail

encodeSerializedInstanceReference

public String encodeSerializedInstanceReference(JType instanceType)
Creates a string that represents a serialized instance reference from a qualified type name.

Returns:
string contianing a serialized instance reference

decodeSerializedInstanceReference

public SerializedInstanceReference decodeSerializedInstanceReference(String encodedSerializedInstanceReference)
Decode a serialized instance reference into its components.

Parameters:
encodedSerializedInstanceReference -
Returns:

getSerializationSignature

public String getSerializationSignature(JType instanceType)
Generate a signature for a type from a fully qualified type name.

Returns:

isSerializable

public boolean isSerializable(JType type)
Return true if the type is serializable. If a type is serializable then there is a secondary type called a FieldSerializer that provides the behavior necessary to serialize or deserialize the fields of an instance.


getSerializedTypeName

public String getSerializedTypeName(JType type)
Return the serialized name of a type. The following table describes the encoding of a serialized type name.
Element Type Serialized Name
Array [Serialized Type Name of Component Type
boolean Z
byte B
char C
class or interface Binary name of class or interface see Class.getName()
double D
float F
int I
long J
short S

Parameters:
type -
Returns:
the serialized type name

getFieldSerializerName

public String getFieldSerializerName(JType type)
Return the name of the field serializer for a particular type. This name can be either the name of a custom field serializer or that of a generated field serializer. If the type is not serializable then it can return null.


getSerializableTypes

public JType[] getSerializableTypes()
Returns the list of all types that are considered serializable.


getSerializableTypesAssignableTo

public JType[] getSerializableTypesAssignableTo(JType type)
Get the set of serializable types that are assignable to the requested class, interface, primitive, parameterized, or array type. The set of types for arrays will always be the inner most component type if it is serializable or for parameterized types it will be the set of types assignable to the raw parameterized type.


getTypeSerializerQualifiedName

public String getTypeSerializerQualifiedName(JClassType serviceIntf)
Return the qualified name of the type serializer class for the given service interface.


getTypeSerializerSimpleName

public String getTypeSerializerSimpleName(JClassType serviceIntf)
Return the simple name of the type serializer class for the given service interface interface.


hasCustomFieldSerializer

public JClassType hasCustomFieldSerializer(JType type)
Return a custom field serializer if there is one associated with a type.


getCustomFieldSerializerInstantiateMethodForType

public JMethod getCustomFieldSerializerInstantiateMethodForType(JType type)
Returns the instantiate method on a custom field serializer if there is one and it is valid or null if there is not.

Parameters:
type -
Returns:
reference to a valid custom field serializer instantiation method or null

applyFieldSerializationPolicy

public JField[] applyFieldSerializationPolicy(JType type)


This javadoc distribution was not produced by Google. The official documentation is here.