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:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,Serializable
,Comparable<DescriptorProtos.FieldDescriptorProto.Type>
,Constable
- Enclosing class:
- DescriptorProtos.FieldDescriptorProto
public static enum DescriptorProtos.FieldDescriptorProto.Type
extends Enum<DescriptorProtos.FieldDescriptorProto.Type>
implements com.google.protobuf.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 ConstantDescriptionTYPE_BOOL = 8;
New in version 2.0 is reserved for errors.TYPE_ENUM = 14;
TYPE_FIXED32 = 7;
TYPE_FIXED64 = 6;
TYPE_FLOAT = 2;
Tag-delimited aggregate.Not ZigZag encoded.Not ZigZag encoded.Length-delimited aggregate.TYPE_SFIXED32 = 15;
TYPE_SFIXED64 = 16;
Uses ZigZag encoding.Uses ZigZag encoding.TYPE_STRING = 9;
TYPE_UINT32 = 13;
TYPE_UINT64 = 4;
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
TYPE_BOOL = 8;
static final int
New in version 2.static final int
0 is reserved for errors.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
Tag-delimited aggregate.static final int
Not ZigZag encoded.static final int
Not ZigZag encoded.static final int
Length-delimited aggregate.static final int
TYPE_SFIXED32 = 15;
static final int
TYPE_SFIXED64 = 16;
static final int
Uses ZigZag encoding.static final int
Uses ZigZag encoding.static final int
TYPE_STRING = 9;
static final int
TYPE_UINT32 = 13;
static final int
TYPE_UINT64 = 4;
-
Method Summary
Modifier and TypeMethodDescriptionforNumber
(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<DescriptorProtos.FieldDescriptorProto.Type>
valueOf
(int value) Deprecated.valueOf
(com.google.protobuf.Descriptors.EnumValueDescriptor desc) 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
0 is reserved for errors. Order is weird for historical reasons.
TYPE_DOUBLE = 1;
-
TYPE_FLOAT
TYPE_FLOAT = 2;
-
TYPE_INT64
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
TYPE_INT64 = 3;
-
TYPE_UINT64
TYPE_UINT64 = 4;
-
TYPE_INT32
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
TYPE_INT32 = 5;
-
TYPE_FIXED64
TYPE_FIXED64 = 6;
-
TYPE_FIXED32
TYPE_FIXED32 = 7;
-
TYPE_BOOL
TYPE_BOOL = 8;
-
TYPE_STRING
TYPE_STRING = 9;
-
TYPE_GROUP
Tag-delimited aggregate. Group type is deprecated and not supported in proto3. However, Proto3 implementations should still be able to parse the group wire format and treat group fields as unknown fields.
TYPE_GROUP = 10;
-
TYPE_MESSAGE
Length-delimited aggregate.
TYPE_MESSAGE = 11;
-
TYPE_BYTES
New in version 2.
TYPE_BYTES = 12;
-
TYPE_UINT32
TYPE_UINT32 = 13;
-
TYPE_ENUM
TYPE_ENUM = 14;
-
TYPE_SFIXED32
TYPE_SFIXED32 = 15;
-
TYPE_SFIXED64
TYPE_SFIXED64 = 16;
-
TYPE_SINT32
Uses ZigZag encoding.
TYPE_SINT32 = 17;
-
TYPE_SINT64
Uses ZigZag encoding.
TYPE_SINT64 = 18;
-
-
Field Details
-
TYPE_DOUBLE_VALUE
public static final int TYPE_DOUBLE_VALUE0 is reserved for errors. Order is weird for historical reasons.
TYPE_DOUBLE = 1;
- 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_VALUENot ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
TYPE_INT64 = 3;
- 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_VALUENot ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
TYPE_INT32 = 5;
- 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_VALUETag-delimited aggregate. Group type is deprecated and not supported in proto3. However, Proto3 implementations should still be able to parse the group wire format and treat group fields as unknown fields.
TYPE_GROUP = 10;
- See Also:
-
TYPE_MESSAGE_VALUE
public static final int TYPE_MESSAGE_VALUELength-delimited aggregate.
TYPE_MESSAGE = 11;
- See Also:
-
TYPE_BYTES_VALUE
public static final int TYPE_BYTES_VALUENew in version 2.
TYPE_BYTES = 12;
- 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_VALUEUses ZigZag encoding.
TYPE_SINT32 = 17;
- See Also:
-
TYPE_SINT64_VALUE
public static final int TYPE_SINT64_VALUEUses ZigZag encoding.
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
public static com.google.protobuf.Internal.EnumLiteMap<DescriptorProtos.FieldDescriptorProto.Type> 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
public static DescriptorProtos.FieldDescriptorProto.Type valueOf(com.google.protobuf.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
-