public interface SymbolScope
SymbolScope
interface is to be implemented by symbol scopes.Modifier and Type | Method and Description |
---|---|
void |
define(Symbol symbol)
Defines the specified symbol in the current scope.
|
Symbol |
getAssociatedSymbol()
Returns symbol associated with the scope (or containing the scope)
or
null it there is not such symbol. |
SymbolScope |
getOuterScope()
Returns the outer scope for the current scope or
null if
there is no outer scope. |
Symbol |
resolve(java.lang.String name)
Searches for a symbol by its name in the current scope and its outer scopes.
|
Symbol |
resolveMember(java.lang.String name)
Searches for a symbol by its name in the current scope only.
|
Symbol |
resolveNested(java.lang.String... names)
Searches for a symbol described by an array containing its name
preceded with names of the scopes the symbol is nested into.
|
void define(Symbol symbol)
symbol
- Symbol to be defined.java.lang.IllegalArgumentException
- if symbol
is null
;
if a symbol with such a name is already defined in the current scope.Symbol resolve(java.lang.String name)
null
is returned.name
- Symbol name.null
if it is not defined.Symbol resolveMember(java.lang.String name)
null
is returned.name
- Symbol name.null
if it is not defined.Symbol resolveNested(java.lang.String... names)
null
is returned.names
- Array of names.null
if it is not defined.SymbolScope getOuterScope()
null
if
there is no outer scope.null
if there is no outer scope.Symbol getAssociatedSymbol()
null
it there is not such symbol.null
it there is not such symbol.