Class BinaryType
- java.lang.Object
-
- net.morimekta.providence.serializer.binary.BinaryType
-
public class BinaryType extends java.lang.Object
Helper class for having binary type ID constants and getting the right binary type ID for a value type.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
asString(byte id)
Readable string value for a type ID.static byte
forType(PType type)
Get the binary type for the given value type.
-
-
-
Field Detail
-
STOP
public static final byte STOP
- See Also:
- Constant Field Values
-
VOID
public static final byte VOID
- See Also:
- Constant Field Values
-
BOOL
public static final byte BOOL
- See Also:
- Constant Field Values
-
BYTE
public static final byte BYTE
- See Also:
- Constant Field Values
-
DOUBLE
public static final byte DOUBLE
- See Also:
- Constant Field Values
-
I16
public static final byte I16
- See Also:
- Constant Field Values
-
I32
public static final byte I32
- See Also:
- Constant Field Values
-
I64
public static final byte I64
- See Also:
- Constant Field Values
-
STRING
public static final byte STRING
- See Also:
- Constant Field Values
-
STRUCT
public static final byte STRUCT
- See Also:
- Constant Field Values
-
MAP
public static final byte MAP
- See Also:
- Constant Field Values
-
SET
public static final byte SET
- See Also:
- Constant Field Values
-
LIST
public static final byte LIST
- See Also:
- Constant Field Values
-
-
Method Detail
-
forType
public static byte forType(@Nonnull PType type)
Get the binary type for the given value type.- Parameters:
type
- The type to check.- Returns:
- The binary type ID.
-
asString
public static java.lang.String asString(byte id)
Readable string value for a type ID.- Parameters:
id
- The type ID.- Returns:
- The type string.
-
-