Package com.google.turbine.binder.lookup
Class WildImportIndex
- java.lang.Object
-
- com.google.turbine.binder.lookup.WildImportIndex
-
- All Implemented Interfaces:
ImportScope
public class WildImportIndex extends java.lang.Object implements ImportScope
A scope that provides best-effort lookup for on-demand imported types in a compilation unit.Resolution is lazy, imports are not evaluated until the first request for a matching simple name.
Static on-demand imports of types are not supported.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.turbine.binder.lookup.ImportScope
ImportScope.ResolveFunction
-
-
Constructor Summary
Constructors Constructor Description WildImportIndex(com.google.common.collect.ImmutableList<com.google.common.base.Supplier<ImportScope>> packages)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WildImportIndexcreate(CanonicalSymbolResolver importResolver, TopLevelIndex cpi, com.google.common.collect.ImmutableList<Tree.ImportDecl> imports)Creates an import index for the given top-level environment.@Nullable LookupResultlookup(LookupKey lookup, ImportScope.ResolveFunction resolve)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.turbine.binder.lookup.ImportScope
append, toScope
-
-
-
-
Constructor Detail
-
WildImportIndex
public WildImportIndex(com.google.common.collect.ImmutableList<com.google.common.base.Supplier<ImportScope>> packages)
-
-
Method Detail
-
create
public static WildImportIndex create(CanonicalSymbolResolver importResolver, TopLevelIndex cpi, com.google.common.collect.ImmutableList<Tree.ImportDecl> imports)
Creates an import index for the given top-level environment.
-
lookup
public @Nullable LookupResult lookup(LookupKey lookup, ImportScope.ResolveFunction resolve)
Description copied from interface:ImportScope- Specified by:
lookupin interfaceImportScope
-
-