Enum Class Tag

java.lang.Object
java.lang.Enum<Tag>
ch.njol.yggdrasil.Tag
All Implemented Interfaces:
Serializable, Comparable<Tag>, Constable

public enum Tag extends Enum<Tag>
  • Enum Constant Details

    • T_NULL

      public static final Tag T_NULL
      the null reference
    • T_BYTE

      public static final Tag T_BYTE
      primitive types
    • T_SHORT

      public static final Tag T_SHORT
    • T_INT

      public static final Tag T_INT
    • T_LONG

      public static final Tag T_LONG
    • T_FLOAT

      public static final Tag T_FLOAT
    • T_DOUBLE

      public static final Tag T_DOUBLE
    • T_CHAR

      public static final Tag T_CHAR
    • T_BOOLEAN

      public static final Tag T_BOOLEAN
    • T_BYTE_OBJ

      public static final Tag T_BYTE_OBJ
      wrapper types
    • T_SHORT_OBJ

      public static final Tag T_SHORT_OBJ
    • T_INT_OBJ

      public static final Tag T_INT_OBJ
    • T_LONG_OBJ

      public static final Tag T_LONG_OBJ
    • T_FLOAT_OBJ

      public static final Tag T_FLOAT_OBJ
    • T_DOUBLE_OBJ

      public static final Tag T_DOUBLE_OBJ
    • T_CHAR_OBJ

      public static final Tag T_CHAR_OBJ
    • T_BOOLEAN_OBJ

      public static final Tag T_BOOLEAN_OBJ
    • T_STRING

      public static final Tag T_STRING
      saved as UTF-8
    • T_ARRAY

      public static final Tag T_ARRAY
      arrays
    • T_ENUM

      public static final Tag T_ENUM
      enum constants invalid input: '&' class singletons
    • T_CLASS

      public static final Tag T_CLASS
    • T_OBJECT

      public static final Tag T_OBJECT
      a generic object
    • T_REFERENCE

      public static final Tag T_REFERENCE
      must always be 0xFF (check uses)
  • Field Details

    • MIN_PRIMITIVE

      public static final int MIN_PRIMITIVE
      primitive tags are between these value
    • MAX_PRIMITIVE

      public static final int MAX_PRIMITIVE
    • MIN_WRAPPER

      public static final int MIN_WRAPPER
      primitive tags are between these value
    • MAX_WRAPPER

      public static final int MAX_WRAPPER
    • tag

      public final byte tag
    • type

      @Nullable public final @Nullable Class<?> type
    • name

      public final String name
  • Method Details

    • values

      public static Tag[] 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

      public static Tag valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Tag>
    • isPrimitive

      public boolean isPrimitive()
    • getPrimitive

      @Nullable public @Nullable Tag getPrimitive()
    • isWrapper

      public boolean isWrapper()
    • getWrapper

      public Tag getWrapper()
    • getType

      public static Tag getType(@Nullable @Nullable Class<?> type)
    • byID

      @Nullable public static @Nullable Tag byID(byte tag)
    • byID

      @Nullable public static @Nullable Tag byID(int tag)
    • byName

      @Nullable public static @Nullable Tag byName(String name)
    • isWrapper

      public static boolean isWrapper(Class<?> type)
    • getPrimitiveFromWrapper

      public static Tag getPrimitiveFromWrapper(Class<?> wrapper)
    • getWrapperClass

      public static Class<?> getWrapperClass(Class<?> primitive)