Package org.microproxy.contentviews
Enum Class ProtoSchema.Type
- All Implemented Interfaces:
Serializable,Comparable<ProtoSchema.Type>,Constable
- Enclosing class:
ProtoSchema
The types a field can be declared with, as numbered in
descriptor.proto.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionbool: varint.bytes: length-delimited.double: fixed64 on the wire.An enum: varint.fixed32.fixed64.float: fixed32 on the wire.A proto2 group.int32: varint (negative values take ten bytes).int64: varint.A nested message: length-delimited.sfixed32.sfixed64.sint32: zigzag varint.sint64: zigzag varint.string: length-delimited UTF-8.uint32: varint.uint64: varint. -
Method Summary
Modifier and TypeMethodDescriptionintnumber()Returns the type's number inFieldDescriptorProto.Type.static Optional<ProtoSchema.Type> of(int number) The type withnumberinFieldDescriptorProto.Type.booleanpackable()Returns whether repeated fields of this type can be packed.static ProtoSchema.TypeReturns the enum constant of this class with the specified name.static ProtoSchema.Type[]values()Returns an array containing the constants of this enum class, in the order they are declared.intwireType()Returns the wire type values of this type are encoded with (unpacked).
-
Enum Constant Details
-
DOUBLE
double: fixed64 on the wire. -
FLOAT
float: fixed32 on the wire. -
INT64
int64: varint. -
UINT64
uint64: varint. -
INT32
int32: varint (negative values take ten bytes). -
FIXED64
fixed64. -
FIXED32
fixed32. -
BOOL
bool: varint. -
STRING
string: length-delimited UTF-8. -
GROUP
A proto2 group. -
MESSAGE
A nested message: length-delimited. -
BYTES
bytes: length-delimited. -
UINT32
uint32: varint. -
ENUM
An enum: varint. -
SFIXED32
sfixed32. -
SFIXED64
sfixed64. -
SINT32
sint32: zigzag varint. -
SINT64
sint64: zigzag varint.
-
-
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
-
number
public int number()Returns the type's number inFieldDescriptorProto.Type.- Returns:
- the type's number in
FieldDescriptorProto.Type
-
of
The type withnumberinFieldDescriptorProto.Type.- Parameters:
number- the type number, 1 to 18- Returns:
- the type, or empty for an unknown number
-
wireType
public int wireType()Returns the wire type values of this type are encoded with (unpacked).- Returns:
- the wire type values of this type are encoded with (unpacked)
-
packable
public boolean packable()Returns whether repeated fields of this type can be packed.- Returns:
- whether repeated fields of this type can be packed
-