Package com.google.turbine.binder.lookup
Interface ImportScope
-
- All Known Implementing Classes:
ImportIndex,WildImportIndex
public interface ImportScopeA scope for imports. Non-canonical imports depend on hierarchy analysis, so to break the cycle we defer non-canonical resolution to aImportScope.ResolveFunctionthat is provided once hierarchy analysis is underway.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceImportScope.ResolveFunctionA function that performs non-canonical resolution, seeResolve.resolve(com.google.turbine.binder.env.Env<com.google.turbine.binder.sym.ClassSymbol, ? extends com.google.turbine.binder.bound.HeaderBoundClass>, com.google.turbine.binder.sym.ClassSymbol, com.google.turbine.binder.sym.ClassSymbol, com.google.turbine.tree.Tree.Ident).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ImportScopeappend(ImportScope next)Adds a scope to the chain, in the manner ofCompoundScope.append(Scope).static ImportScopefromScope(Scope scope)Creates a trivialImportScopefrom aScope, which ignores the providedImportScope.ResolveFunctionand calls the underlying scope's lookup method.@Nullable LookupResultlookup(LookupKey lookupKey, ImportScope.ResolveFunction resolve)default CompoundScopetoScope(ImportScope.ResolveFunction resolve)Partially applies the givenImportScope.ResolveFunctionto thisImportScope.
-
-
-
Method Detail
-
lookup
@Nullable LookupResult lookup(LookupKey lookupKey, ImportScope.ResolveFunction resolve)
-
append
default ImportScope append(ImportScope next)
Adds a scope to the chain, in the manner ofCompoundScope.append(Scope).
-
fromScope
static ImportScope fromScope(Scope scope)
Creates a trivialImportScopefrom aScope, which ignores the providedImportScope.ResolveFunctionand calls the underlying scope's lookup method. Used to chainScopes andImportScopes together.
-
toScope
default CompoundScope toScope(ImportScope.ResolveFunction resolve)
Partially applies the givenImportScope.ResolveFunctionto thisImportScope.
-
-