public static class Scope.CompoundScope extends Scope implements Scope.ScopeListener
Scope.CompoundScope, Scope.DelegatedScope, Scope.Entry, Scope.ErrorScope, Scope.ImportScope, Scope.ScopeListener, Scope.StarImportScope
Modifier and Type | Field and Description |
---|---|
static Scope.Entry[] |
emptyTable |
elems, emptyScope, next, owner
Constructor and Description |
---|
CompoundScope(Symbol owner) |
Modifier and Type | Method and Description |
---|---|
void |
addSubScope(Scope that) |
Scope |
dup(Symbol newOwner)
Construct a fresh scope within this scope, with new owner,
which shares its table with the outer scope.
|
void |
enter(Symbol sym,
Scope s,
Scope origin,
boolean staticallyImported)
Enter symbol sym in this scope, but mark that it comes from
given scope `s' accessed through `origin'.
|
Iterable<Symbol> |
getElements(Filter<Symbol> sf) |
Iterable<Symbol> |
getElementsByName(Name name,
Filter<Symbol> sf) |
int |
getMark() |
Scope.Entry |
lookup(Name name,
Filter<Symbol> sf) |
void |
remove(Symbol sym)
Remove symbol from this scope.
|
void |
symbolAdded(Symbol sym,
Scope s) |
void |
symbolRemoved(Symbol sym,
Scope s) |
String |
toString() |
addScopeListener, anyMatch, dup, dupUnshared, enter, enter, enterIfAbsent, getElements, getElementsByName, includes, leave, lookup
public static final Scope.Entry[] emptyTable
public CompoundScope(Symbol owner)
public void addSubScope(Scope that)
public void symbolAdded(Symbol sym, Scope s)
symbolAdded
in interface Scope.ScopeListener
public void symbolRemoved(Symbol sym, Scope s)
symbolRemoved
in interface Scope.ScopeListener
public int getMark()
public Iterable<Symbol> getElements(Filter<Symbol> sf)
getElements
in class Scope
public Iterable<Symbol> getElementsByName(Name name, Filter<Symbol> sf)
getElementsByName
in class Scope
public Scope dup(Symbol newOwner)
Scope
public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported)
Scope
Copyright © 2015. All rights reserved.