Package ch.njol.yggdrasil
Enum Class Tag
- All Implemented Interfaces:
Serializable
,Comparable<Tag>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionarraysprimitive typeswrapper typesenum constants & class singletonsthe null referencea generic objectmust always be 0xFF (check uses)saved as UTF-8 -
Field Summary
Modifier and TypeFieldDescription@Nullable Class<?>
static int
primitive tags are between these valuestatic int
primitive tags are between these valuestatic int
primitive tags are between these valuestatic int
primitive tags are between these valuebyte
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Tag
byID(byte tag)
static @Nullable Tag
byID(int tag)
static @Nullable Tag
@Nullable Tag
static Tag
getPrimitiveFromWrapper(Class<?> wrapper)
static Tag
static Class<?>
getWrapperClass(Class<?> primitive)
boolean
boolean
static boolean
toString()
static Tag
Returns the enum constant of this class with the specified name.static Tag[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
T_NULL
the null reference -
T_BYTE
primitive types -
T_SHORT
-
T_INT
-
T_LONG
-
T_FLOAT
-
T_DOUBLE
-
T_CHAR
-
T_BOOLEAN
-
T_BYTE_OBJ
wrapper types -
T_SHORT_OBJ
-
T_INT_OBJ
-
T_LONG_OBJ
-
T_FLOAT_OBJ
-
T_DOUBLE_OBJ
-
T_CHAR_OBJ
-
T_BOOLEAN_OBJ
-
T_STRING
saved as UTF-8 -
T_ARRAY
arrays -
T_ENUM
enum constants & class singletons -
T_CLASS
-
T_OBJECT
a generic object -
T_REFERENCE
must always be 0xFF (check uses)
-
-
Field Details
-
MIN_PRIMITIVE
public static final int MIN_PRIMITIVEprimitive tags are between these value -
MAX_PRIMITIVE
public static final int MAX_PRIMITIVEprimitive tags are between these value -
MIN_WRAPPER
public static final int MIN_WRAPPERprimitive tags are between these value -
MAX_WRAPPER
public static final int MAX_WRAPPERprimitive tags are between these value -
tag
public final byte tag -
c
-
name
-
-
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
-
toString
-
isPrimitive
public boolean isPrimitive() -
getPrimitive
-
isWrapper
public boolean isWrapper() -
getWrapper
-
getType
-
byID
-
byID
-
byName
-
isWrapper
-
getPrimitiveFromWrapper
-
getWrapperClass
-