Interface Type

    • Method Detail

      • isNumericType

        default boolean isNumericType()
        Yields true if and only if this type is an instance of NumericType.
        Returns:
        true if that condition holds
      • isBooleanType

        default boolean isBooleanType()
        Yields true if and only if this type is an instance of BooleanType.
        Returns:
        true if that condition holds
      • isStringType

        default boolean isStringType()
        Yields true if and only if this type is an instance of StringType.
        Returns:
        true if that condition holds
      • isUntyped

        default boolean isUntyped()
        Yields true if and only if this type is an instance of Untyped.
        Returns:
        true if that condition holds
      • asUntyped

        default Untyped asUntyped()
        Returns this type casted as an Untyped, only if isUntyped() yields true. Otherwise, this method returns null.
        Returns:
        this type casted as Untyped, or null
      • isVoidType

        default boolean isVoidType()
        Yields true if and only if this type is an instance of VoidType.
        Returns:
        true if that condition holds
      • asVoidType

        default VoidType asVoidType()
        Returns this type casted as a VoidType, only if isVoidType() yields true. Otherwise, this method returns null.
        Returns:
        this type casted as VoidType, or null
      • isPointerType

        default boolean isPointerType()
        Yields true if and only if this type is an instance of PointerType.
        Returns:
        true if that condition holds
      • isArrayType

        default boolean isArrayType()
        Yields true if and only if this type is an instance of ArrayType.
        Returns:
        true if that condition holds
      • asArrayType

        default ArrayType asArrayType()
        Returns this type casted as a ArrayType, only if isArrayType() yields true. Otherwise, this method returns null.
        Returns:
        this type casted as ArrayType, or null
      • isNullType

        default boolean isNullType()
        Yields true if and only if this type is an instance of NullType.
        Returns:
        true if that condition holds
      • asNullType

        default NullType asNullType()
        Returns this type casted as a NullType, only if isNullType() yields true. Otherwise, this method returns null.
        Returns:
        this type casted as NullType, or null
      • isUnitType

        default boolean isUnitType()
        Yields true if and only if this type is an instance of UnitType.
        Returns:
        true if that condition holds
      • asUnitType

        default UnitType asUnitType()
        Returns this type casted as a UnitType, only if isUnitType() yields true. Otherwise, this method returns null.
        Returns:
        this type casted as UnitType, or null
      • isTypeTokenType

        default boolean isTypeTokenType()
        Yields true if and only if this type is an instance of TypeTokenType.
        Returns:
        true if that condition holds
      • canBeAssignedTo

        boolean canBeAssignedTo​(Type other)
        Determines if the type represented by this Type object is either the same as, or is a subtype of, the type represented by other. It returns true if so, and returns false otherwise.
        Parameters:
        other - the other type
        Returns:
        true if that condition holds
      • commonSupertype

        Type commonSupertype​(Type other)
        Yields the most specific common supertype between this Type and the given one. If no common supertype exists, this method returns Untyped.INSTANCE.
        Parameters:
        other - the other type
        Returns:
        the most specific common supertype between this and other
      • allInstances

        java.util.Collection<Type> allInstances()
        Yields all possible instances of this type, including itself.
        Returns:
        the possible instances