|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaitools.jiffle.parser.SymbolScope
public class SymbolScope
Stores symbols in a Jiffle script at a single scope level. Used during script compilation.
| Constructor Summary | |
|---|---|
SymbolScope(String name)
Creates a new scope. |
|
| Method Summary | |
|---|---|
void |
add(Symbol symbol)
Adds a symbol to this scope. |
Symbol |
findSymbolNamed(String name)
Gets the symbol with the given name if one exists. |
String |
getName()
Gets the scope label. |
List<Symbol> |
getSymbols()
Gets the list of symbols in this scope. |
boolean |
hasSymbolNamed(String name)
Tests if this scope contains a symbol with the given name. |
boolean |
isEmpty()
Tests if this scope is empty. |
int |
size()
Gets the number of symbols in this scope. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SymbolScope(String name)
name - a scope label| Method Detail |
|---|
public String getName()
public List<Symbol> getSymbols()
public boolean isEmpty()
true if there are no symbols; false otherwisepublic int size()
public void add(Symbol symbol)
symbol - the symbol
IllegalArgumentException - if symbol is nullpublic boolean hasSymbolNamed(String name)
name - symbol name
true if a symbol with this name is found;
false otherwisepublic Symbol findSymbolNamed(String name)
name - symbol name
null if not match was found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||