|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.uwaterloo.cs.ql.interp.SyntaxTreeNode
ca.uwaterloo.cs.ql.interp.ScopedNode
public abstract class ScopedNode
| Constructor Summary | |
|---|---|
ScopedNode(Scope parent)
Construct a new ScopedNode. |
|
| Method Summary | |
|---|---|
void |
addVariable(Variable v)
Adds a variable into this scope. |
java.util.Enumeration |
allVariables()
Enumerates all variables in this scope. |
void |
clear()
Clears this scope. |
Scope |
getParent()
Gets the parent scope. |
boolean |
hasVariable(java.lang.String name)
Tests if this scope has a variable with the specified name. |
abstract Variable |
lookup(java.lang.String name)
Looks up a variable from this scope. |
void |
removeVariable(Variable v)
Removes a variable from this scope. |
| Methods inherited from class ca.uwaterloo.cs.ql.interp.SyntaxTreeNode |
|---|
evaluate, getLocation, propagate, setLocation, strLocation |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScopedNode(Scope parent)
| Method Detail |
|---|
public void clear()
clear in interface Scopepublic Scope getParent()
getParent in interface Scopepublic java.util.Enumeration allVariables()
allVariables in interface Scopepublic void addVariable(Variable v)
addVariable in interface Scopev - the variable to add.public void removeVariable(Variable v)
removeVariable in interface Scopev - the variable to remove.public boolean hasVariable(java.lang.String name)
name.
hasVariable in interface Scopename - the variable's name.
public abstract Variable lookup(java.lang.String name)
throws LookupException
lookup in interface Scopename - the name of the variable to look up.
LookupException - if no variable was found.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||