ValueCodex (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.web.bindery.autobean.shared
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
`(package private) static class` | `ValueCodex.Type`

Constructor Summary
`ValueCodex()`

Method Summary
`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. use `decode(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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ValueCodex

    public ValueCodex()

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. use `decode(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 over `encode(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.

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD