Class ValueCodex

java.lang.Object
com.google.web.bindery.autobean.shared.ValueCodex

public class ValueCodex extends Object
Provides unified encoding and decoding of value objects.
  • Constructor Details

    • ValueCodex

      public ValueCodex()
  • Method Details

    • canDecode

      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
    • decode

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

      @Deprecated public static <T> T decode(Class<T> clazz, String string)
      Deprecated.
      No callers in GWT codebase.
      Throws:
      UnsupportedOperationException
    • encode

      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.
    • encode

      public static Splittable encode(Object obj)
    • getAllValueTypes

      public static Set<Class<?>> getAllValueTypes()
      Return all Value types that can be processed by the ValueCodex.
    • getUninitializedFieldValue

      public static Object getUninitializedFieldValue(Class<?> clazz)
      Returns the uninitialized field value for the given primitive type.