Interface TopLevelIndex

  • All Known Implementing Classes:
    CompoundTopLevelIndex, SimpleTopLevelIndex

    public interface TopLevelIndex
    An index of canonical type names.

    Used to resolve top-level qualified type names in the classpath, and the sources being compiled. Also provides lookup scopes for individual packages.

    Only top-level classes are stored. Nested type names can't usually be assumed to be canonical (the qualifier may inherited the named type, rather than declaring it directly), so nested types are resolved separately with appropriate handling of non-canonical names. For bytecode we may end up storing desugared nested classes (e.g. Map$Entry), but we can't tell until the class file has been read and we have access to the InnerClasses attribtue.

    • Method Detail

      • scope

        Scope scope()
        Returns a scope to look up top-level qualified type names.
      • lookupPackage

        @Nullable PackageScope lookupPackage​(java.lang.Iterable<java.lang.String> packagename)
        Returns a scope to look up members of the given package.