Package com.google.turbine.binder.lookup
Class SimpleTopLevelIndex
- java.lang.Object
-
- com.google.turbine.binder.lookup.SimpleTopLevelIndex
-
- All Implemented Interfaces:
TopLevelIndex
public class SimpleTopLevelIndex extends java.lang.Object implements TopLevelIndex
An index of canonical type names where all members are known statically.Qualified names are represented internally as a tree, where each package name part or class name is a node.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleTopLevelIndex.BuilderA builder forTopLevelIndexes.static classSimpleTopLevelIndex.NodeA class symbol or package.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleTopLevelIndex.Builderbuilder()Returns a builder forTopLevelIndexes.@Nullable PackageScopelookupPackage(java.lang.Iterable<java.lang.String> packagename)Returns aScopethat performs lookups in the given qualified package name.static TopLevelIndexof(java.lang.Iterable<ClassSymbol> syms)Creates an index over the given symbols.Scopescope()Returns a scope to look up top-level qualified type names.
-
-
-
Method Detail
-
builder
public static SimpleTopLevelIndex.Builder builder()
Returns a builder forTopLevelIndexes.
-
of
public static TopLevelIndex of(java.lang.Iterable<ClassSymbol> syms)
Creates an index over the given symbols.
-
scope
public Scope scope()
Description copied from interface:TopLevelIndexReturns a scope to look up top-level qualified type names.- Specified by:
scopein interfaceTopLevelIndex
-
lookupPackage
public @Nullable PackageScope lookupPackage(java.lang.Iterable<java.lang.String> packagename)
Returns aScopethat performs lookups in the given qualified package name.- Specified by:
lookupPackagein interfaceTopLevelIndex
-
-