Package com.google.protobuf
Enum Class Field.Kind
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,Serializable
,Comparable<Field.Kind>
,Constable
- Enclosing class:
- Field
public static enum Field.Kind
extends Enum<Field.Kind>
implements com.google.protobuf.ProtocolMessageEnum
Basic field types.Protobuf enum
google.protobuf.Field.Kind
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionField type bool.Field type bytes.Field type double.Field type enum.Field type fixed32.Field type fixed64.Field type float.Field type group.Field type int32.Field type int64.Field type message.Field type sfixed32.Field type sfixed64.Field type sint32.Field type sint64.Field type string.Field type uint32.Field type uint64.Field type unknown. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Field type bool.static final int
Field type bytes.static final int
Field type double.static final int
Field type enum.static final int
Field type fixed32.static final int
Field type fixed64.static final int
Field type float.static final int
Field type group.static final int
Field type int32.static final int
Field type int64.static final int
Field type message.static final int
Field type sfixed32.static final int
Field type sfixed64.static final int
Field type sint32.static final int
Field type sint64.static final int
Field type string.static final int
Field type uint32.static final int
Field type uint64.static final int
Field type unknown. -
Method Summary
Modifier and TypeMethodDescriptionstatic Field.Kind
forNumber
(int value) static final com.google.protobuf.Descriptors.EnumDescriptor
final com.google.protobuf.Descriptors.EnumDescriptor
final int
final com.google.protobuf.Descriptors.EnumValueDescriptor
static com.google.protobuf.Internal.EnumLiteMap<Field.Kind>
static Field.Kind
valueOf
(int value) Deprecated.static Field.Kind
valueOf
(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this class with the specified name.static Field.Kind
Returns the enum constant of this class with the specified name.static Field.Kind[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TYPE_UNKNOWN
Field type unknown.
TYPE_UNKNOWN = 0;
-
TYPE_DOUBLE
Field type double.
TYPE_DOUBLE = 1;
-
TYPE_FLOAT
Field type float.
TYPE_FLOAT = 2;
-
TYPE_INT64
Field type int64.
TYPE_INT64 = 3;
-
TYPE_UINT64
Field type uint64.
TYPE_UINT64 = 4;
-
TYPE_INT32
Field type int32.
TYPE_INT32 = 5;
-
TYPE_FIXED64
Field type fixed64.
TYPE_FIXED64 = 6;
-
TYPE_FIXED32
Field type fixed32.
TYPE_FIXED32 = 7;
-
TYPE_BOOL
Field type bool.
TYPE_BOOL = 8;
-
TYPE_STRING
Field type string.
TYPE_STRING = 9;
-
TYPE_GROUP
Field type group. Proto2 syntax only, and deprecated.
TYPE_GROUP = 10;
-
TYPE_MESSAGE
Field type message.
TYPE_MESSAGE = 11;
-
TYPE_BYTES
Field type bytes.
TYPE_BYTES = 12;
-
TYPE_UINT32
Field type uint32.
TYPE_UINT32 = 13;
-
TYPE_ENUM
Field type enum.
TYPE_ENUM = 14;
-
TYPE_SFIXED32
Field type sfixed32.
TYPE_SFIXED32 = 15;
-
TYPE_SFIXED64
Field type sfixed64.
TYPE_SFIXED64 = 16;
-
TYPE_SINT32
Field type sint32.
TYPE_SINT32 = 17;
-
TYPE_SINT64
Field type sint64.
TYPE_SINT64 = 18;
-
UNRECOGNIZED
-
-
Field Details
-
TYPE_UNKNOWN_VALUE
public static final int TYPE_UNKNOWN_VALUEField type unknown.
TYPE_UNKNOWN = 0;
- See Also:
-
TYPE_DOUBLE_VALUE
public static final int TYPE_DOUBLE_VALUEField type double.
TYPE_DOUBLE = 1;
- See Also:
-
TYPE_FLOAT_VALUE
public static final int TYPE_FLOAT_VALUEField type float.
TYPE_FLOAT = 2;
- See Also:
-
TYPE_INT64_VALUE
public static final int TYPE_INT64_VALUEField type int64.
TYPE_INT64 = 3;
- See Also:
-
TYPE_UINT64_VALUE
public static final int TYPE_UINT64_VALUEField type uint64.
TYPE_UINT64 = 4;
- See Also:
-
TYPE_INT32_VALUE
public static final int TYPE_INT32_VALUEField type int32.
TYPE_INT32 = 5;
- See Also:
-
TYPE_FIXED64_VALUE
public static final int TYPE_FIXED64_VALUEField type fixed64.
TYPE_FIXED64 = 6;
- See Also:
-
TYPE_FIXED32_VALUE
public static final int TYPE_FIXED32_VALUEField type fixed32.
TYPE_FIXED32 = 7;
- See Also:
-
TYPE_BOOL_VALUE
public static final int TYPE_BOOL_VALUEField type bool.
TYPE_BOOL = 8;
- See Also:
-
TYPE_STRING_VALUE
public static final int TYPE_STRING_VALUEField type string.
TYPE_STRING = 9;
- See Also:
-
TYPE_GROUP_VALUE
public static final int TYPE_GROUP_VALUEField type group. Proto2 syntax only, and deprecated.
TYPE_GROUP = 10;
- See Also:
-
TYPE_MESSAGE_VALUE
public static final int TYPE_MESSAGE_VALUEField type message.
TYPE_MESSAGE = 11;
- See Also:
-
TYPE_BYTES_VALUE
public static final int TYPE_BYTES_VALUEField type bytes.
TYPE_BYTES = 12;
- See Also:
-
TYPE_UINT32_VALUE
public static final int TYPE_UINT32_VALUEField type uint32.
TYPE_UINT32 = 13;
- See Also:
-
TYPE_ENUM_VALUE
public static final int TYPE_ENUM_VALUEField type enum.
TYPE_ENUM = 14;
- See Also:
-
TYPE_SFIXED32_VALUE
public static final int TYPE_SFIXED32_VALUEField type sfixed32.
TYPE_SFIXED32 = 15;
- See Also:
-
TYPE_SFIXED64_VALUE
public static final int TYPE_SFIXED64_VALUEField type sfixed64.
TYPE_SFIXED64 = 16;
- See Also:
-
TYPE_SINT32_VALUE
public static final int TYPE_SINT32_VALUEField type sint32.
TYPE_SINT32 = 17;
- See Also:
-
TYPE_SINT64_VALUE
public static final int TYPE_SINT64_VALUEField type sint64.
TYPE_SINT64 = 18;
- See Also:
-
-
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
-
getNumber
public final int getNumber()- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.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:
value
- 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
-
forNumber
- Parameters:
value
- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
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:
desc
- 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
-