@ExperimentalApi public enum JavaType extends java.lang.Enum<JavaType>
Enum Constant and Description |
---|
BOOLEAN |
BYTE_STRING |
DOUBLE |
ENUM |
FLOAT |
INT |
LONG |
MESSAGE |
STRING |
VOID |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getBoxedType() |
java.lang.Object |
getDefaultDefault()
The default default value for fields of this type, if it's a primitive type.
|
java.lang.Class<?> |
getType()
Gets the required type for a field that would hold a value of this type.
|
boolean |
isValidType(java.lang.Class<?> t)
Indicates whether or not this
JavaType can be applied to a field of the given type. |
static JavaType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JavaType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JavaType VOID
public static final JavaType INT
public static final JavaType LONG
public static final JavaType FLOAT
public static final JavaType DOUBLE
public static final JavaType BOOLEAN
public static final JavaType STRING
public static final JavaType BYTE_STRING
public static final JavaType ENUM
public static final JavaType MESSAGE
public static JavaType[] values()
for (JavaType c : JavaType.values()) System.out.println(c);
public static JavaType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.Object getDefaultDefault()
public java.lang.Class<?> getType()
public java.lang.Class<?> getBoxedType()
public boolean isValidType(java.lang.Class<?> t)
JavaType
can be applied to a field of the given type.