public class

ValueCodex

extends Object
java.lang.Object
   ↳ com.google.gwt.autobean.shared.ValueCodex

Class Overview

Provides unified encoding and decoding of value objects.

Summary

Public Constructors
ValueCodex()
Public Methods
static boolean canDecode(Class<?> clazz)
Returns true if ValueCodex can operate on values of the given type.
static <T> T decode(Class<T> clazz, String string)
static <T> T decode(Class<T> clazz, Splittable split)
static Splittable encode(Object obj)
static Splittable encode(Class<?> clazz, Object obj)
Encode a value object when the wire format type is known.
static Set<Class<?>> getAllValueTypes()
Return all Value types that can be processed by the ValueCodex.
static Object getUninitializedFieldValue(Class<?> clazz)
Returns the uninitialized field value for the given primitive type.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ValueCodex ()

Public Methods

public static boolean canDecode (Class<?> clazz)

Returns true if ValueCodex can operate on values of the given type.

Parameters
clazz a Class object
Returns
  • true if the given object type can be decoded

public static T decode (Class<T> clazz, String string)

public static T decode (Class<T> clazz, Splittable split)

public static Splittable encode (Object obj)

public static Splittable encode (Class<?> clazz, Object obj)

Encode a value object when the wire format type is known. This method should be preferred over encode(Object) when possible.

public static Set<Class<?>> getAllValueTypes ()

Return all Value types that can be processed by the ValueCodex.

public static Object getUninitializedFieldValue (Class<?> clazz)

Returns the uninitialized field value for the given primitive type.