Interface Type<T>

Type Parameters:
T - the type
All Known Subinterfaces:
ArrayType<T,ComponentType>, BoxedType<T>, GenericType<T>, PrimitiveType<T>
All Known Implementing Classes:
ArrayTypeBase, BooleanType, BoxedBooleanType, BoxedByteType, BoxedCharType, BoxedDoubleType, BoxedFloatType, BoxedIntType, BoxedLongType, BoxedShortType, BoxedTypeBase, ByteType, CharType, ColumnTypeBase, CustomType, DoubleType, FloatType, GenericTypeBase, GenericVectorType, InstantType, IntType, LongType, NativeArrayType, PrimitiveTypeBase, PrimitiveVectorType, ShortType, StringType

public interface Type<T>
A type.
See Also:
  • Method Details

    • find

      static <T> Type<T> find(Class<T> dataType)
      Finds the known type, or else creates the relevant native array type or custom type.
      Type Parameters:
      T - the generic type of dataType
      Parameters:
      dataType - the data type
      Returns:
      the type
    • find

      static <T> Type<T> find(Class<T> dataType, @Nullable @Nullable Class<?> componentType)
      If componentType is not null, this will find the appropriate ArrayType. Otherwise, this is equivalent to find(Class).
      Type Parameters:
      T - the generic type of dataType
      Parameters:
      dataType - the data type
      componentType - the component type
      Returns:
      the type
    • knownTypes

      static List<Type<?>> knownTypes()
      The list of known types. Includes the universe of primitive types and generic types minus custom types and array types.
      Returns:
      the list of known types
    • booleanType

      static BooleanType booleanType()
      Creates the boolean type.
      Returns:
      the boolean type
    • byteType

      static ByteType byteType()
      Creates the byte type.
      Returns:
      the byte type
    • charType

      static CharType charType()
      Creates the char type.
      Returns:
      the char type
    • shortType

      static ShortType shortType()
      Creates the short type.
      Returns:
      the short type
    • intType

      static IntType intType()
      Creates the int type.
      Returns:
      the int type
    • longType

      static LongType longType()
      Creates the long type.
      Returns:
      the long type
    • floatType

      static FloatType floatType()
      Creates the float type.
      Returns:
      the float type
    • doubleType

      static DoubleType doubleType()
      Creates the double type.
      Returns:
      the double type
    • stringType

      static StringType stringType()
      Creates the string type.
      Returns:
      the string type
    • instantType

      static InstantType instantType()
      Creates the instant type.
      Returns:
      the instant type
    • ofCustom

      static <T> CustomType<T> ofCustom(Class<T> clazz)
      Creates a custom type. Equivalent to CustomType.of(clazz).
      Type Parameters:
      T - the type
      Parameters:
      clazz - the class
      Returns:
      the custom type
    • clazz

      Class<T> clazz()
      The class representing this type.
      Returns:
      the class
    • arrayType

      NativeArrayType<?,T> arrayType()
      Create a native array type with this as the component type.
      Returns:
      the native array type
    • walk

      <R> R walk(Type.Visitor<R> visitor)