Package com.google.protobuf
Enum Class DescriptorProtos.FieldDescriptorProto.Type
java.lang.Object
java.lang.Enum<DescriptorProtos.FieldDescriptorProto.Type>
com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type
- All Implemented Interfaces:
Internal.EnumLite
,ProtocolMessageEnum
,Serializable
,Comparable<DescriptorProtos.FieldDescriptorProto.Type>
,Constable
- Enclosing class:
- DescriptorProtos.FieldDescriptorProto
public static enum DescriptorProtos.FieldDescriptorProto.Type
extends Enum<DescriptorProtos.FieldDescriptorProto.Type>
implements ProtocolMessageEnum
Protobuf enum
google.protobuf.FieldDescriptorProto.Type
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTYPE_BOOL = 8;
TYPE_BYTES = 12;
TYPE_DOUBLE = 1;
TYPE_ENUM = 14;
TYPE_FIXED32 = 7;
TYPE_FIXED64 = 6;
TYPE_FLOAT = 2;
TYPE_GROUP = 10;
TYPE_INT32 = 5;
TYPE_INT64 = 3;
TYPE_MESSAGE = 11;
TYPE_SFIXED32 = 15;
TYPE_SFIXED64 = 16;
TYPE_SINT32 = 17;
TYPE_SINT64 = 18;
TYPE_STRING = 9;
TYPE_UINT32 = 13;
TYPE_UINT64 = 4;
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
TYPE_BOOL = 8;
static final int
TYPE_BYTES = 12;
static final int
TYPE_DOUBLE = 1;
static final int
TYPE_ENUM = 14;
static final int
TYPE_FIXED32 = 7;
static final int
TYPE_FIXED64 = 6;
static final int
TYPE_FLOAT = 2;
static final int
TYPE_GROUP = 10;
static final int
TYPE_INT32 = 5;
static final int
TYPE_INT64 = 3;
static final int
TYPE_MESSAGE = 11;
static final int
TYPE_SFIXED32 = 15;
static final int
TYPE_SFIXED64 = 16;
static final int
TYPE_SINT32 = 17;
static final int
TYPE_SINT64 = 18;
static final int
TYPE_STRING = 9;
static final int
TYPE_UINT32 = 13;
static final int
TYPE_UINT64 = 4;
-
Method Summary
Modifier and TypeMethodDescriptionstatic final Descriptors.EnumDescriptor
Return the enum type's descriptor, which contains information about each defined value, etc.final int
Return the value's numeric value as defined in the .proto file.Return the value's descriptor, which contains information such as value name, number, and type.valueOf
(int value) Returns the enum constant of this class with the specified name.Returns the enum constant of this class with the specified name.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TYPE_DOUBLE
TYPE_DOUBLE = 1;
0 is reserved for errors. Order is weird for historical reasons.
-
TYPE_FLOAT
TYPE_FLOAT = 2;
-
TYPE_INT64
TYPE_INT64 = 3;
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
-
TYPE_UINT64
TYPE_UINT64 = 4;
-
TYPE_INT32
TYPE_INT32 = 5;
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
-
TYPE_FIXED64
TYPE_FIXED64 = 6;
-
TYPE_FIXED32
TYPE_FIXED32 = 7;
-
TYPE_BOOL
TYPE_BOOL = 8;
-
TYPE_STRING
TYPE_STRING = 9;
-
TYPE_GROUP
TYPE_GROUP = 10;
Tag-delimited aggregate.
-
TYPE_MESSAGE
TYPE_MESSAGE = 11;
Length-delimited aggregate.
-
TYPE_BYTES
TYPE_BYTES = 12;
New in version 2.
-
TYPE_UINT32
TYPE_UINT32 = 13;
-
TYPE_ENUM
TYPE_ENUM = 14;
-
TYPE_SFIXED32
TYPE_SFIXED32 = 15;
-
TYPE_SFIXED64
TYPE_SFIXED64 = 16;
-
TYPE_SINT32
TYPE_SINT32 = 17;
Uses ZigZag encoding.
-
TYPE_SINT64
TYPE_SINT64 = 18;
Uses ZigZag encoding.
-
-
Field Details
-
TYPE_DOUBLE_VALUE
public static final int TYPE_DOUBLE_VALUETYPE_DOUBLE = 1;
0 is reserved for errors. Order is weird for historical reasons.
- See Also:
-
TYPE_FLOAT_VALUE
public static final int TYPE_FLOAT_VALUETYPE_FLOAT = 2;
- See Also:
-
TYPE_INT64_VALUE
public static final int TYPE_INT64_VALUETYPE_INT64 = 3;
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
- See Also:
-
TYPE_UINT64_VALUE
public static final int TYPE_UINT64_VALUETYPE_UINT64 = 4;
- See Also:
-
TYPE_INT32_VALUE
public static final int TYPE_INT32_VALUETYPE_INT32 = 5;
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
- See Also:
-
TYPE_FIXED64_VALUE
public static final int TYPE_FIXED64_VALUETYPE_FIXED64 = 6;
- See Also:
-
TYPE_FIXED32_VALUE
public static final int TYPE_FIXED32_VALUETYPE_FIXED32 = 7;
- See Also:
-
TYPE_BOOL_VALUE
public static final int TYPE_BOOL_VALUETYPE_BOOL = 8;
- See Also:
-
TYPE_STRING_VALUE
public static final int TYPE_STRING_VALUETYPE_STRING = 9;
- See Also:
-
TYPE_GROUP_VALUE
public static final int TYPE_GROUP_VALUETYPE_GROUP = 10;
Tag-delimited aggregate.
- See Also:
-
TYPE_MESSAGE_VALUE
public static final int TYPE_MESSAGE_VALUETYPE_MESSAGE = 11;
Length-delimited aggregate.
- See Also:
-
TYPE_BYTES_VALUE
public static final int TYPE_BYTES_VALUETYPE_BYTES = 12;
New in version 2.
- See Also:
-
TYPE_UINT32_VALUE
public static final int TYPE_UINT32_VALUETYPE_UINT32 = 13;
- See Also:
-
TYPE_ENUM_VALUE
public static final int TYPE_ENUM_VALUETYPE_ENUM = 14;
- See Also:
-
TYPE_SFIXED32_VALUE
public static final int TYPE_SFIXED32_VALUETYPE_SFIXED32 = 15;
- See Also:
-
TYPE_SFIXED64_VALUE
public static final int TYPE_SFIXED64_VALUETYPE_SFIXED64 = 16;
- See Also:
-
TYPE_SINT32_VALUE
public static final int TYPE_SINT32_VALUETYPE_SINT32 = 17;
Uses ZigZag encoding.
- See Also:
-
TYPE_SINT64_VALUE
public static final int TYPE_SINT64_VALUETYPE_SINT64 = 18;
Uses ZigZag encoding.
- 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()Description copied from interface:ProtocolMessageEnum
Return the value's numeric value as defined in the .proto file.- Specified by:
getNumber
in interfaceInternal.EnumLite
- Specified by:
getNumber
in interfaceProtocolMessageEnum
-
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:
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
-
internalGetValueMap
public static Internal.EnumLiteMap<DescriptorProtos.FieldDescriptorProto.Type> internalGetValueMap() -
getValueDescriptor
Description copied from interface:ProtocolMessageEnum
Return the value's descriptor, which contains information such as value name, number, and type.- Specified by:
getValueDescriptor
in interfaceProtocolMessageEnum
-
getDescriptorForType
Description copied from interface:ProtocolMessageEnum
Return the enum type's descriptor, which contains information about each defined value, etc.- Specified by:
getDescriptorForType
in interfaceProtocolMessageEnum
-
getDescriptor
-
valueOf
public static DescriptorProtos.FieldDescriptorProto.Type valueOf(Descriptors.EnumValueDescriptor desc) 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
-