Class Type<T>

    • Field Detail

      • BYTE

        public static final ByteType BYTE
      • BYTE_ARRAY_PRIMITIVE

        public static final Type<byte[]> BYTE_ARRAY_PRIMITIVE
      • SHORT_BYTE_ARRAY

        public static final Type<byte[]> SHORT_BYTE_ARRAY
      • REMAINING_BYTES

        public static final Type<byte[]> REMAINING_BYTES
      • INT

        public static final IntType INT
      • LONG

        public static final LongType LONG
      • LONG_ARRAY_PRIMITIVE

        public static final Type<long[]> LONG_ARRAY_PRIMITIVE
      • COMPONENT

        public static final Type<com.google.gson.JsonElement> COMPONENT
      • OPTIONAL_COMPONENT

        public static final Type<com.google.gson.JsonElement> OPTIONAL_COMPONENT
      • STRING

        public static final Type<java.lang.String> STRING
      • STRING_ARRAY

        public static final Type<java.lang.String[]> STRING_ARRAY
      • UUID

        public static final Type<java.util.UUID> UUID
      • OPTIONAL_UUID

        public static final Type<java.util.UUID> OPTIONAL_UUID
      • UUID_INT_ARRAY

        public static final Type<java.util.UUID> UUID_INT_ARRAY
      • UUID_ARRAY

        public static final Type<java.util.UUID[]> UUID_ARRAY
      • VAR_INT_ARRAY_PRIMITIVE

        public static final Type<int[]> VAR_INT_ARRAY_PRIMITIVE
      • BYTE_ARRAY

        @Deprecated
        public static final Type<java.lang.Byte[]> BYTE_ARRAY
        Deprecated.
      • UNSIGNED_BYTE_ARRAY

        @Deprecated
        public static final Type<java.lang.Short[]> UNSIGNED_BYTE_ARRAY
        Deprecated.
      • BOOLEAN_ARRAY

        @Deprecated
        public static final Type<java.lang.Boolean[]> BOOLEAN_ARRAY
        Deprecated.
      • INT_ARRAY

        @Deprecated
        public static final Type<java.lang.Integer[]> INT_ARRAY
        Deprecated.
      • SHORT_ARRAY

        @Deprecated
        public static final Type<java.lang.Short[]> SHORT_ARRAY
        Deprecated.
      • UNSIGNED_SHORT_ARRAY

        @Deprecated
        public static final Type<java.lang.Integer[]> UNSIGNED_SHORT_ARRAY
        Deprecated.
      • DOUBLE_ARRAY

        @Deprecated
        public static final Type<java.lang.Double[]> DOUBLE_ARRAY
        Deprecated.
      • LONG_ARRAY

        @Deprecated
        public static final Type<java.lang.Long[]> LONG_ARRAY
        Deprecated.
      • FLOAT_ARRAY

        @Deprecated
        public static final Type<java.lang.Float[]> FLOAT_ARRAY
        Deprecated.
      • VAR_INT_ARRAY

        @Deprecated
        public static final Type<java.lang.Integer[]> VAR_INT_ARRAY
        Deprecated.
      • VAR_LONG_ARRAY

        @Deprecated
        public static final Type<java.lang.Long[]> VAR_LONG_ARRAY
        Deprecated.
      • NOTHING

        public static final VoidType NOTHING
      • POSITION1_14

        public static final Type<Position> POSITION1_14
      • NBT

        public static final Type<com.github.steveice10.opennbt.tag.builtin.CompoundTag> NBT
      • NBT_ARRAY

        public static final Type<com.github.steveice10.opennbt.tag.builtin.CompoundTag[]> NBT_ARRAY
      • OPTIONAL_POSITION

        public static final Type<Position> OPTIONAL_POSITION
      • OPTIONAL_POSITION_1_14

        public static final Type<Position> OPTIONAL_POSITION_1_14
      • VAR_LONG_BLOCK_CHANGE_RECORD_ARRAY

        public static final Type<BlockChangeRecord[]> VAR_LONG_BLOCK_CHANGE_RECORD_ARRAY
      • ITEM

        public static final Type<Item> ITEM
      • ITEM_ARRAY

        public static final Type<Item[]> ITEM_ARRAY
      • FLAT_ITEM

        public static final Type<Item> FLAT_ITEM
      • FLAT_VAR_INT_ITEM

        public static final Type<Item> FLAT_VAR_INT_ITEM
      • FLAT_ITEM_ARRAY

        public static final Type<Item[]> FLAT_ITEM_ARRAY
      • FLAT_VAR_INT_ITEM_ARRAY

        public static final Type<Item[]> FLAT_VAR_INT_ITEM_ARRAY
      • FLAT_ITEM_ARRAY_VAR_INT

        public static final Type<Item[]> FLAT_ITEM_ARRAY_VAR_INT
      • FLAT_VAR_INT_ITEM_ARRAY_VAR_INT

        public static final Type<Item[]> FLAT_VAR_INT_ITEM_ARRAY_VAR_INT
    • Constructor Detail

      • Type

        protected Type​(java.lang.Class<? super T> outputClass)
      • Type

        protected Type​(java.lang.String typeName,
                       java.lang.Class<? super T> outputClass)
    • Method Detail

      • getOutputClass

        public java.lang.Class<? super T> getOutputClass()
        Returns the output class type.
        Returns:
        output class type
      • getTypeName

        public java.lang.String getTypeName()
        Returns the type name.
        Returns:
        type name
      • getBaseClass

        public java.lang.Class<? extends Type> getBaseClass()
        Returns the base class, useful when the output class is insufficient for type comparison. One such case are types with {List} as their output type.
        Returns:
        base class
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object