public interface Scope
| Modifier and Type | Method and Description |
|---|---|
void |
define(Symbol symbol)
Defines a symbol inside this Scope.
|
void |
dispose()
Frees up resources used by this Scope
|
Set<Symbol> |
getAllSymbols()
Retrieves all the Symbol instances in this Scope
|
Set<Symbol> |
getAllSymbols(Type type)
Retrieves all the Symbol instances in this Scope whose tyoe is equal to
the input Type.
|
Scope |
getEnclosingScope()
Retrieves the Scope enclosing this.
|
String |
getScopeName()
Retrieves the name of the scope
|
Set<Symbol> |
match(String prefix)
Retrieves the set of Symbol instances whose name starts with the input
prefix.
|
Symbol |
resolve(String name)
Retrieves the symbol corresponding to the input name.
|
String getScopeName()
Scope getEnclosingScope()
null if this Scope
is the top-most (global) one.void define(Symbol symbol)
symbol - The Symbol to define. Cannot be null.NullPointerException - if the input is null.Symbol resolve(String name)
name - the name of the Symbol to retrieve. Cannot be null.null otherwise.NullPointerException - if the input is null.Set<Symbol> match(String prefix)
prefix - The input prefix. Cannot be null.NullPointerException - if the input is null.Set<Symbol> getAllSymbols()
Set<Symbol> getAllSymbols(Type type)
type - . The Type of the Symbols to retrieve. Cannot be null.NullPointerException - if the input is null.void dispose()
Copyright © 2015 The University of Manchester. All Rights Reserved.