@ExperimentalApi public enum JavaType extends Enum<JavaType>
Enum Constant and Description |
---|
BOOLEAN |
BYTE_STRING |
DOUBLE |
ENUM |
FLOAT |
INT |
LONG |
MESSAGE |
STRING |
VOID |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getBoxedType() |
Object |
getDefaultDefault()
The default default value for fields of this type, if it's a primitive type.
|
Class<?> |
getType()
Gets the required type for a field that would hold a value of this type.
|
boolean |
isValidType(Class<?> t)
Indicates whether or not this
JavaType can be applied to a field of the given type. |
static JavaType |
valueOf(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(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Object getDefaultDefault()
public Class<?> getType()
public Class<?> getBoxedType()
Copyright © 2008–2022. All rights reserved.