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;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
FieldsModifier and TypeFieldDescriptionprivate static final Internal.EnumLiteMap<DescriptorProtos.FieldDescriptorProto.Type>static final intTYPE_BOOL = 8;static final intNew in version 2.static final int0 is reserved for errors.static final intTYPE_ENUM = 14;static final intTYPE_FIXED32 = 7;static final intTYPE_FIXED64 = 6;static final intTYPE_FLOAT = 2;static final intTag-delimited aggregate.static final intNot ZigZag encoded.static final intNot ZigZag encoded.static final intLength-delimited aggregate.static final intTYPE_SFIXED32 = 15;static final intTYPE_SFIXED64 = 16;static final intUses ZigZag encoding.static final intUses ZigZag encoding.static final intTYPE_STRING = 9;static final intTYPE_UINT32 = 13;static final intTYPE_UINT64 = 4;private final intprivate static final DescriptorProtos.FieldDescriptorProto.Type[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static final Descriptors.EnumDescriptorReturn the enum type's descriptor, which contains information about each defined value, etc.final intReturn 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) Deprecated.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 after google.protobuf. However, Proto3 implementations should still be able to parse the group wire format and treat group fields as unknown fields. In Editions, the group wire format can be enabled via the `message_encoding` feature.
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 after google.protobuf. However, Proto3 implementations should still be able to parse the group wire format and treat group fields as unknown fields. In Editions, the group wire format can be enabled via the `message_encoding` feature.
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:
-
internalValueMap
private static final Internal.EnumLiteMap<DescriptorProtos.FieldDescriptorProto.Type> internalValueMap -
VALUES
-
value
private final int value
-
-
Constructor Details
-
Type
private Type(int value)
-
-
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:ProtocolMessageEnumReturn the value's numeric value as defined in the .proto file.- Specified by:
getNumberin interfaceInternal.EnumLite- Specified by:
getNumberin interfaceProtocolMessageEnum
-
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 Internal.EnumLiteMap<DescriptorProtos.FieldDescriptorProto.Type> internalGetValueMap() -
getValueDescriptor
Description copied from interface:ProtocolMessageEnumReturn the value's descriptor, which contains information such as value name, number, and type.- Specified by:
getValueDescriptorin interfaceProtocolMessageEnum
-
getDescriptorForType
Description copied from interface:ProtocolMessageEnumReturn the enum type's descriptor, which contains information about each defined value, etc.- Specified by:
getDescriptorForTypein 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
-