Package com.google.protobuf
Enum DescriptorProtos.FieldDescriptorProto.Type
- java.lang.Object
-
- java.lang.Enum<DescriptorProtos.FieldDescriptorProto.Type>
-
- com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type
-
- All Implemented Interfaces:
Internal.EnumLite,ProtocolMessageEnum,java.io.Serializable,java.lang.Comparable<DescriptorProtos.FieldDescriptorProto.Type>
- Enclosing class:
- DescriptorProtos.FieldDescriptorProto
public static enum DescriptorProtos.FieldDescriptorProto.Type extends java.lang.Enum<DescriptorProtos.FieldDescriptorProto.Type> implements ProtocolMessageEnum
Protobuf enumgoogle.protobuf.FieldDescriptorProto.Type
-
-
Enum Constant Summary
Enum Constants Enum Constant Description TYPE_BOOLTYPE_BOOL = 8;TYPE_BYTESNew in version 2.TYPE_DOUBLE0 is reserved for errors.TYPE_ENUMTYPE_ENUM = 14;TYPE_FIXED32TYPE_FIXED32 = 7;TYPE_FIXED64TYPE_FIXED64 = 6;TYPE_FLOATTYPE_FLOAT = 2;TYPE_GROUPTag-delimited aggregate.TYPE_INT32Not ZigZag encoded.TYPE_INT64Not ZigZag encoded.TYPE_MESSAGELength-delimited aggregate.TYPE_SFIXED32TYPE_SFIXED32 = 15;TYPE_SFIXED64TYPE_SFIXED64 = 16;TYPE_SINT32Uses ZigZag encoding.TYPE_SINT64Uses ZigZag encoding.TYPE_STRINGTYPE_STRING = 9;TYPE_UINT32TYPE_UINT32 = 13;TYPE_UINT64TYPE_UINT64 = 4;
-
Field Summary
Fields Modifier and Type Field Description static intTYPE_BOOL_VALUETYPE_BOOL = 8;static intTYPE_BYTES_VALUENew in version 2.static intTYPE_DOUBLE_VALUE0 is reserved for errors.static intTYPE_ENUM_VALUETYPE_ENUM = 14;static intTYPE_FIXED32_VALUETYPE_FIXED32 = 7;static intTYPE_FIXED64_VALUETYPE_FIXED64 = 6;static intTYPE_FLOAT_VALUETYPE_FLOAT = 2;static intTYPE_GROUP_VALUETag-delimited aggregate.static intTYPE_INT32_VALUENot ZigZag encoded.static intTYPE_INT64_VALUENot ZigZag encoded.static intTYPE_MESSAGE_VALUELength-delimited aggregate.static intTYPE_SFIXED32_VALUETYPE_SFIXED32 = 15;static intTYPE_SFIXED64_VALUETYPE_SFIXED64 = 16;static intTYPE_SINT32_VALUEUses ZigZag encoding.static intTYPE_SINT64_VALUEUses ZigZag encoding.static intTYPE_STRING_VALUETYPE_STRING = 9;static intTYPE_UINT32_VALUETYPE_UINT32 = 13;static intTYPE_UINT64_VALUETYPE_UINT64 = 4;
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DescriptorProtos.FieldDescriptorProto.TypeforNumber(int value)static Descriptors.EnumDescriptorgetDescriptor()Descriptors.EnumDescriptorgetDescriptorForType()Return the enum type's descriptor, which contains information about each defined value, etc.intgetNumber()Return the value's numeric value as defined in the .proto file.Descriptors.EnumValueDescriptorgetValueDescriptor()Return the value's descriptor, which contains information such as value name, number, and type.static Internal.EnumLiteMap<DescriptorProtos.FieldDescriptorProto.Type>internalGetValueMap()static DescriptorProtos.FieldDescriptorProto.TypevalueOf(int value)Deprecated.static DescriptorProtos.FieldDescriptorProto.TypevalueOf(Descriptors.EnumValueDescriptor desc)Returns the enum constant of this type with the specified name.static DescriptorProtos.FieldDescriptorProto.TypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DescriptorProtos.FieldDescriptorProto.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TYPE_DOUBLE
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_DOUBLE
0 is reserved for errors. Order is weird for historical reasons.
TYPE_DOUBLE = 1;
-
TYPE_FLOAT
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_FLOAT
TYPE_FLOAT = 2;
-
TYPE_INT64
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_INT64
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
TYPE_INT64 = 3;
-
TYPE_UINT64
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_UINT64
TYPE_UINT64 = 4;
-
TYPE_INT32
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_INT32
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
TYPE_INT32 = 5;
-
TYPE_FIXED64
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_FIXED64
TYPE_FIXED64 = 6;
-
TYPE_FIXED32
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_FIXED32
TYPE_FIXED32 = 7;
-
TYPE_BOOL
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_BOOL
TYPE_BOOL = 8;
-
TYPE_STRING
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_STRING
TYPE_STRING = 9;
-
TYPE_GROUP
public static final DescriptorProtos.FieldDescriptorProto.Type 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
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_MESSAGE
Length-delimited aggregate.
TYPE_MESSAGE = 11;
-
TYPE_BYTES
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_BYTES
New in version 2.
TYPE_BYTES = 12;
-
TYPE_UINT32
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_UINT32
TYPE_UINT32 = 13;
-
TYPE_ENUM
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_ENUM
TYPE_ENUM = 14;
-
TYPE_SFIXED32
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_SFIXED32
TYPE_SFIXED32 = 15;
-
TYPE_SFIXED64
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_SFIXED64
TYPE_SFIXED64 = 16;
-
TYPE_SINT32
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_SINT32
Uses ZigZag encoding.
TYPE_SINT32 = 17;
-
TYPE_SINT64
public static final DescriptorProtos.FieldDescriptorProto.Type TYPE_SINT64
Uses ZigZag encoding.
TYPE_SINT64 = 18;
-
-
Field Detail
-
TYPE_DOUBLE_VALUE
public static final int TYPE_DOUBLE_VALUE
0 is reserved for errors. Order is weird for historical reasons.
TYPE_DOUBLE = 1;- See Also:
- Constant Field Values
-
TYPE_FLOAT_VALUE
public static final int TYPE_FLOAT_VALUE
TYPE_FLOAT = 2;- See Also:
- Constant Field Values
-
TYPE_INT64_VALUE
public static final int TYPE_INT64_VALUE
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
TYPE_INT64 = 3;- See Also:
- Constant Field Values
-
TYPE_UINT64_VALUE
public static final int TYPE_UINT64_VALUE
TYPE_UINT64 = 4;- See Also:
- Constant Field Values
-
TYPE_INT32_VALUE
public static final int TYPE_INT32_VALUE
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
TYPE_INT32 = 5;- See Also:
- Constant Field Values
-
TYPE_FIXED64_VALUE
public static final int TYPE_FIXED64_VALUE
TYPE_FIXED64 = 6;- See Also:
- Constant Field Values
-
TYPE_FIXED32_VALUE
public static final int TYPE_FIXED32_VALUE
TYPE_FIXED32 = 7;- See Also:
- Constant Field Values
-
TYPE_BOOL_VALUE
public static final int TYPE_BOOL_VALUE
TYPE_BOOL = 8;- See Also:
- Constant Field Values
-
TYPE_STRING_VALUE
public static final int TYPE_STRING_VALUE
TYPE_STRING = 9;- See Also:
- Constant Field Values
-
TYPE_GROUP_VALUE
public static final int TYPE_GROUP_VALUE
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;- See Also:
- Constant Field Values
-
TYPE_MESSAGE_VALUE
public static final int TYPE_MESSAGE_VALUE
Length-delimited aggregate.
TYPE_MESSAGE = 11;- See Also:
- Constant Field Values
-
TYPE_BYTES_VALUE
public static final int TYPE_BYTES_VALUE
New in version 2.
TYPE_BYTES = 12;- See Also:
- Constant Field Values
-
TYPE_UINT32_VALUE
public static final int TYPE_UINT32_VALUE
TYPE_UINT32 = 13;- See Also:
- Constant Field Values
-
TYPE_ENUM_VALUE
public static final int TYPE_ENUM_VALUE
TYPE_ENUM = 14;- See Also:
- Constant Field Values
-
TYPE_SFIXED32_VALUE
public static final int TYPE_SFIXED32_VALUE
TYPE_SFIXED32 = 15;- See Also:
- Constant Field Values
-
TYPE_SFIXED64_VALUE
public static final int TYPE_SFIXED64_VALUE
TYPE_SFIXED64 = 16;- See Also:
- Constant Field Values
-
TYPE_SINT32_VALUE
public static final int TYPE_SINT32_VALUE
Uses ZigZag encoding.
TYPE_SINT32 = 17;- See Also:
- Constant Field Values
-
TYPE_SINT64_VALUE
public static final int TYPE_SINT64_VALUE
Uses ZigZag encoding.
TYPE_SINT64 = 18;- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static DescriptorProtos.FieldDescriptorProto.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DescriptorProtos.FieldDescriptorProto.Type c : DescriptorProtos.FieldDescriptorProto.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DescriptorProtos.FieldDescriptorProto.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- 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 public static DescriptorProtos.FieldDescriptorProto.Type valueOf(int value)
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
forNumber
public static DescriptorProtos.FieldDescriptorProto.Type forNumber(int value)
- 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
public final Descriptors.EnumValueDescriptor 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
public final Descriptors.EnumDescriptor getDescriptorForType()
Description copied from interface:ProtocolMessageEnumReturn the enum type's descriptor, which contains information about each defined value, etc.- Specified by:
getDescriptorForTypein interfaceProtocolMessageEnum
-
getDescriptor
public static final Descriptors.EnumDescriptor getDescriptor()
-
valueOf
public static DescriptorProtos.FieldDescriptorProto.Type valueOf(Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-