Class NoResolvedType

All Implemented Interfaces:
JSType.WithSourceRef

public final class NoResolvedType extends NoType
An unresolved type that was forward declared. So we know it exists, but that it wasn't pulled into this binary. In most cases, it behaves like a bottom type in the type lattice: no real type should be assigned to a NoResolvedType, but the NoResolvedType is a subtype of everything. In a few cases, it behaves like the unknown type: properties of this type are also NoResolved types, and comparisons to other types always have an unknown result.
  • Method Details

    • getReferenceName

      public @Nullable String getReferenceName()
      Description copied from class: ObjectType
      Gets the reference name for this object. This includes named types like constructors, prototypes, and enums. It notably does not include literal types like strings and booleans and structural types.

      Returning an empty string means something different than returning null. An empty string may indicate an anonymous constructor, which we treat differently than a literal type without a reference name. e.g. in InstanceObjectType.appendTo(TypeStringBuilder)

      Overrides:
      getReferenceName in class NoObjectType
      Returns:
      the object's name or null if this is an anonymous object
    • getTemplateTypes

      public @Nullable com.google.common.collect.ImmutableList<JSType> getTemplateTypes()
      Description copied from class: ObjectType
      Gets the declared default element type.
      Overrides:
      getTemplateTypes in class ObjectType
      See Also:
    • isNoResolvedType

      public boolean isNoResolvedType()
      Overrides:
      isNoResolvedType in class JSType
    • isNoType

      public boolean isNoType()
      Overrides:
      isNoType in class NoType