Enum ValueCodex.Type
- java.lang.Object
-
- java.lang.Enum<ValueCodex.Type>
-
- com.google.web.bindery.autobean.shared.ValueCodex.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ValueCodex.Type>
- Enclosing class:
- ValueCodex
static enum ValueCodex.Type extends java.lang.Enum<ValueCodex.Type>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BIG_DECIMAL
BIG_INTEGER
BOOLEAN
BYTE
CHARACTER
DATE
DOUBLE
ENUM
FLOAT
INTEGER
LONG
SHORT
SPLITTABLE
STRING
VOID
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canUpcast(java.lang.Object value)
Determines whether or not the Type can handle the given value via upcasting semantics.abstract java.lang.Object
decode(java.lang.Class<?> clazz, Splittable value)
abstract Splittable
encode(java.lang.Object value)
java.lang.Object
getDefaultValue()
java.lang.Class<?>
getPrimitiveType()
java.lang.Class<?>
getType()
static ValueCodex.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ValueCodex.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BIG_DECIMAL
public static final ValueCodex.Type BIG_DECIMAL
-
BIG_INTEGER
public static final ValueCodex.Type BIG_INTEGER
-
BOOLEAN
public static final ValueCodex.Type BOOLEAN
-
BYTE
public static final ValueCodex.Type BYTE
-
CHARACTER
public static final ValueCodex.Type CHARACTER
-
DATE
public static final ValueCodex.Type DATE
-
DOUBLE
public static final ValueCodex.Type DOUBLE
-
ENUM
public static final ValueCodex.Type ENUM
-
FLOAT
public static final ValueCodex.Type FLOAT
-
INTEGER
public static final ValueCodex.Type INTEGER
-
LONG
public static final ValueCodex.Type LONG
-
SHORT
public static final ValueCodex.Type SHORT
-
STRING
public static final ValueCodex.Type STRING
-
SPLITTABLE
public static final ValueCodex.Type SPLITTABLE
-
VOID
public static final ValueCodex.Type VOID
-
-
Method Detail
-
values
public static ValueCodex.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ValueCodex.Type c : ValueCodex.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValueCodex.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
canUpcast
public boolean canUpcast(java.lang.Object value)
Determines whether or not the Type can handle the given value via upcasting semantics.- Parameters:
value
- a value Object
-
decode
public abstract java.lang.Object decode(java.lang.Class<?> clazz, Splittable value)
-
encode
public abstract Splittable encode(java.lang.Object value)
-
getDefaultValue
public java.lang.Object getDefaultValue()
-
getPrimitiveType
public java.lang.Class<?> getPrimitiveType()
-
getType
public java.lang.Class<?> getType()
-
-