Package com.google.protobuf
Enum Class JavaType
- All Implemented Interfaces:
Serializable
,Comparable<JavaType>
,Constable
Enum that identifies the Java types required to store protobuf fields.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> 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 thisJavaType
can be applied to a field of the given type.static JavaType
Returns the enum constant of this class with the specified name.static JavaType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VOID
-
INT
-
LONG
-
FLOAT
-
DOUBLE
-
BOOLEAN
-
STRING
-
BYTE_STRING
-
ENUM
-
MESSAGE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getDefaultDefault
The default default value for fields of this type, if it's a primitive type. -
getType
Gets the required type for a field that would hold a value of this type. -
getBoxedType
- Returns:
- the boxedType
-
isValidType
Indicates whether or not thisJavaType
can be applied to a field of the given type.
-