Enum Class WireType
- All Implemented Interfaces:
Serializable,Comparable<WireType>,Constable
The WireTypes
- Since:
- 17862
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionstring, bytes, embedded messages, packed repeated fieldsfixed64, sfixed64, doublefixed32, sfixed32, floatFor unknown WireTypesint32, int64, uint32, uint64, sing32, sint64, bool, enum -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static WireType[]Get a pre-calculated array of allWireTypevalues.byteGet the type representation (byte form)static WireTypeReturns the enum constant of this class with the specified name.static WireType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VARINT
int32, int64, uint32, uint64, sing32, sint64, bool, enum -
SIXTY_FOUR_BIT
fixed64, sfixed64, double -
LENGTH_DELIMITED
string, bytes, embedded messages, packed repeated fields -
THIRTY_TWO_BIT
fixed32, sfixed32, float -
UNKNOWN
For unknown WireTypes
-
-
Field Details
-
CACHED_VALUES
-
type
-
-
Constructor Details
-
WireType
-
-
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
-
getTypeRepresentation
Get the type representation (byte form)- Returns:
- The wire type byte representation
-
getAllValues
Get a pre-calculated array of allWireTypevalues.- Returns:
- An array of values, meant as a drop-in replacement for
values()where the array is not modified! This can significantly reduce allocations, as there is no defensive array copy.
-