Enum Class BinaryNativeKind
- All Implemented Interfaces:
Serializable,Comparable<BinaryNativeKind>,Constable
Discriminant returned by
TokenReader.getNativeKind() that classifies the
binary-native metadata (if any) carried by the cursor's current token.
A TokenReader surfaces format-native value types as metadata on the existing
token vocabulary rather than as new top-level events. A native wrapper rides on whatever
token the wrapped value emits (VALUE_* or START_*); this enum lets a
format-agnostic consumer branch on the kind of native metadata without having to test the
cursor's runtime type.
Each enum value names the concrete native concept it represents. New values may be added in future minor releases as additional formats expose native opt-in metadata.
See Also:
TokenReader— the cursor that exposes this discriminant.- Serializers and Parsers
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe current token represents a CBOR simple value (major type 7).The current token is wrapped by one or more semantic tags (CBOR major type 6).The current token represents a MsgPackextvalue (signed type byte + binary payload).The current token carries no binary-native metadata. -
Method Summary
Modifier and TypeMethodDescriptionstatic BinaryNativeKindReturns the enum constant of this class with the specified name.static BinaryNativeKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
The current token carries no binary-native metadata. -
CBOR_TAG
The current token is wrapped by one or more semantic tags (CBOR major type 6). Surfaced viaTokenReader.getTagCount()/TokenReader.getTag(int). -
CBOR_SIMPLE
The current token represents a CBOR simple value (major type 7). Token type isTokenType.VALUE_NULL; the simple int is surfaced viaTokenReader.getSimpleValue(). -
MSGPACK_EXT
The current token represents a MsgPackextvalue (signed type byte + binary payload). Token type isTokenType.VALUE_BINARY; the type byte is surfaced viaTokenReader.getExtType().
-
-
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
-