Interface InferredType

  • All Known Implementing Classes:
    DeclaredType

    @Beta
    public interface InferredType
    • Method Detail

      • isIdentityComparableWith

        @Beta
        boolean isIdentityComparableWith​(InferredType other)
      • canHaveMember

        @Beta
        boolean canHaveMember​(String memberName)
      • declaresMember

        @Beta
        boolean declaresMember​(String memberName)
        Used to handle uncertainty of declared types. It return false when a member is not present in a declared type, while canHaveMember returns true because one of its subtype may have it.
      • canOnlyBe

        @Beta
        boolean canOnlyBe​(String typeName)
      • canBeOrExtend

        @Beta
        boolean canBeOrExtend​(String typeName)
      • isCompatibleWith

        @Beta
        boolean isCompatibleWith​(InferredType other)
      • mustBeOrExtend

        @Beta
        boolean mustBeOrExtend​(String typeName)
        mustBeOrExtend implies we know for sure the given type is either of the given typeName or a subtype of it. As opposed to "canBeOrExtend", this will return true only when we are sure the subtyping relationship is present. For types inferred from type annotations (DeclaredType), the actual underlying type might be different from what has been declared, but it must be or extend the declared type.