Class ValueCodex
- java.lang.Object
-
- com.google.web.bindery.autobean.shared.ValueCodex
-
public class ValueCodex extends java.lang.Object
Provides unified encoding and decoding of value objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ValueCodex.Type
-
Constructor Summary
Constructors Constructor Description ValueCodex()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
canDecode(java.lang.Class<?> clazz)
Returns true if ValueCodex can operate on values of the given type.static <T> T
decode(java.lang.Class<T> clazz, Splittable split)
static <T> T
decode(java.lang.Class<T> clazz, java.lang.String string)
Deprecated.usedecode(Class, Splittable)
instead.static Splittable
encode(java.lang.Class<?> clazz, java.lang.Object obj)
Encode a value object when the wire format type is known.static Splittable
encode(java.lang.Object obj)
static java.util.Set<java.lang.Class<?>>
getAllValueTypes()
Return all Value types that can be processed by the ValueCodex.static java.lang.Object
getUninitializedFieldValue(java.lang.Class<?> clazz)
Returns the uninitialized field value for the given primitive type.
-
-
-
Method Detail
-
canDecode
public static boolean canDecode(java.lang.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
-
decode
public static <T> T decode(java.lang.Class<T> clazz, Splittable split)
-
decode
@Deprecated public static <T> T decode(java.lang.Class<T> clazz, java.lang.String string)
Deprecated.usedecode(Class, Splittable)
instead.No callers in GWT codebase.- Throws:
java.lang.UnsupportedOperationException
-
encode
public static Splittable encode(java.lang.Class<?> clazz, java.lang.Object obj)
Encode a value object when the wire format type is known. This method should be preferred overencode(Object)
when possible.
-
encode
public static Splittable encode(java.lang.Object obj)
-
getAllValueTypes
public static java.util.Set<java.lang.Class<?>> getAllValueTypes()
Return all Value types that can be processed by the ValueCodex.
-
getUninitializedFieldValue
public static java.lang.Object getUninitializedFieldValue(java.lang.Class<?> clazz)
Returns the uninitialized field value for the given primitive type.
-
-