public enum Type extends Enum<Type> implements EnumReadable
DescriptorProtos.FieldDescriptorProto| 枚举常量和说明 |
|---|
TYPE_BOOL
TYPE_BOOL = 8; |
TYPE_BYTES
TYPE_BYTES = 12;
New in version 2. |
TYPE_DOUBLE
TYPE_DOUBLE = 1;
0 is reserved for errors. |
TYPE_ENUM
TYPE_ENUM = 14; |
TYPE_FIXED32
TYPE_FIXED32 = 7; |
TYPE_FIXED64
TYPE_FIXED64 = 6; |
TYPE_FLOAT
TYPE_FLOAT = 2; |
TYPE_GROUP
TYPE_GROUP = 10;
Tag-delimited aggregate. |
TYPE_INT32
TYPE_INT32 = 5;
Not ZigZag encoded. |
TYPE_INT64
TYPE_INT64 = 3;
Not ZigZag encoded. |
TYPE_MESSAGE
TYPE_MESSAGE = 11;
Length-delimited aggregate. |
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. |
TYPE_STRING
TYPE_STRING = 9; |
TYPE_UINT32
TYPE_UINT32 = 13; |
TYPE_UINT64
TYPE_UINT64 = 4; |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
value() |
static Type |
valueOf(int value) |
static Type |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Type[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Type TYPE_DOUBLE
TYPE_DOUBLE = 1;
0 is reserved for errors. Order is weird for historical reasons.
public static final Type TYPE_FLOAT
TYPE_FLOAT = 2;public static final Type TYPE_INT64
TYPE_INT64 = 3;
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
public static final Type TYPE_UINT64
TYPE_UINT64 = 4;public static final Type TYPE_INT32
TYPE_INT32 = 5;
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
public static final Type TYPE_FIXED64
TYPE_FIXED64 = 6;public static final Type TYPE_FIXED32
TYPE_FIXED32 = 7;public static final Type TYPE_BOOL
TYPE_BOOL = 8;public static final Type TYPE_STRING
TYPE_STRING = 9;public static final Type TYPE_GROUP
TYPE_GROUP = 10;
Tag-delimited aggregate.
public static final Type TYPE_MESSAGE
TYPE_MESSAGE = 11;
Length-delimited aggregate.
public static final Type TYPE_BYTES
TYPE_BYTES = 12;
New in version 2.
public static final Type TYPE_UINT32
TYPE_UINT32 = 13;public static final Type TYPE_ENUM
TYPE_ENUM = 14;public static final Type TYPE_SFIXED32
TYPE_SFIXED32 = 15;public static final Type TYPE_SFIXED64
TYPE_SFIXED64 = 16;public static final Type TYPE_SINT32
TYPE_SINT32 = 17;
Uses ZigZag encoding.
public static final Type TYPE_SINT64
TYPE_SINT64 = 18;
Uses ZigZag encoding.
public static Type[] values()
for (Type c : Type.values()) System.out.println(c);
public static Type valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int value()
value 在接口中 EnumReadablepublic static Type valueOf(int value)
Copyright © 2022 Baidu, Inc.. All rights reserved.