Interface VariableTypeInfo

All Superinterfaces:
TypeInfo
All Known Implementing Classes:
VariableTypeInfoImpl

public interface VariableTypeInfo extends TypeInfo
a TypeInfo implementation representing TypeVariable
Author:
ZZZank
See Also:
  • Method Details

    • name

      String name()
      See Also:
    • bounds

      List<TypeInfo> bounds(TypeInfoFactory factory)
      See Also:
    • mainBound

      TypeInfo mainBound()
      The main bound is what a TypeVariable will become when converted to a Class, aka what this type should be after Java erased generic type info

      for T, the main bound will be Object, for T extends XXX, the main bound will be XXX, for T extends XXX & YYY & ZZZ the main bound will still be XXX

      See Also:
    • shouldReplace

      default boolean shouldReplace()
      Specified by:
      shouldReplace in interface TypeInfo
      Returns:
      true if this type contains too little information (e.g. being TypeInfo.NONE) and should be replaced by actual object type, false otherwise
    • isEnum

      default boolean isEnum()
      Specified by:
      isEnum in interface TypeInfo
      See Also:
    • isInterface

      default boolean isInterface()
      Specified by:
      isInterface in interface TypeInfo
      See Also:
    • asClass

      default Class<?> asClass()
      Description copied from interface: TypeInfo
      Get the Class object represented by this TypeInfo. For a Type object, the TypeInfo object created from the Type object should return the exact same class as the one after Java erased its generic type info
      Specified by:
      asClass in interface TypeInfo
    • isObjectExact

      default boolean isObjectExact()
      Specified by:
      isObjectExact in interface TypeInfo
      Returns:
      true if this TypeInfo represents Object class
    • isNumber

      default boolean isNumber()
      Specified by:
      isNumber in interface TypeInfo
      Returns:
      true if this TypeInfo represents a type assignable to Number class
      See Also:
    • getTypeTag

      default int getTypeTag()
      Specified by:
      getTypeTag in interface TypeInfo
      See Also:
    • isVoid

      default boolean isVoid()
      Specified by:
      isVoid in interface TypeInfo
      Returns:
      true if this TypeInfo represents Void class or void class
    • isBoolean

      default boolean isBoolean()
      Specified by:
      isBoolean in interface TypeInfo
      Returns:
      true if this TypeInfo represents Boolean class or boolean class
    • isByte

      default boolean isByte()
      Specified by:
      isByte in interface TypeInfo
      Returns:
      true if this TypeInfo represents Byte class or byte class
    • isShort

      default boolean isShort()
      Specified by:
      isShort in interface TypeInfo
      Returns:
      true if this TypeInfo represents Short class or short class
    • isInt

      default boolean isInt()
      Specified by:
      isInt in interface TypeInfo
      Returns:
      true if this TypeInfo represents Integer class or int class
    • isLong

      default boolean isLong()
      Specified by:
      isLong in interface TypeInfo
      Returns:
      true if this TypeInfo represents Long class or long class
    • isFloat

      default boolean isFloat()
      Specified by:
      isFloat in interface TypeInfo
      Returns:
      true if this TypeInfo represents Float class or float class
    • isDouble

      default boolean isDouble()
      Specified by:
      isDouble in interface TypeInfo
      Returns:
      true if this TypeInfo represents Double class or double class
    • isCharacter

      default boolean isCharacter()
      Specified by:
      isCharacter in interface TypeInfo
      Returns:
      true if this TypeInfo represents Character class or char class
    • isString

      default boolean isString()
      Specified by:
      isString in interface TypeInfo
      Returns:
      true if this TypeInfo represents String class
    • isArray

      default boolean isArray()
      Specified by:
      isArray in interface TypeInfo
      See Also: