|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The classes that implements this interface represent contexts of execution
Method Summary | |
void |
define(java.lang.String name,
java.lang.Object value)
Defines a new variable in the current scope |
void |
defineConstant(java.lang.String name,
java.lang.Object value)
Defines a new constant variable in the current scope |
void |
defineVariables(java.util.Set vars)
Defines the given variables |
void |
enterScope()
Enters a scope |
void |
enterScope(java.util.Set entries)
Enters a scope and defines the given entries to null. |
java.lang.Object |
get(java.lang.String name)
Returns the value of a variable with the given name |
java.util.Map |
getConstants()
Creates a map that contains the constants in this context |
java.util.Set |
getCurrentScopeVariableNames()
Returns the current scope variables (strings) in a set |
java.util.Set |
getCurrentScopeVariables()
Returns the current scope variables (strings) in a set |
boolean |
isDefinedVariable(java.lang.String name)
Tests whether a variable is defined in this context |
boolean |
isFinal(java.lang.String name)
Tests whether a variable is final in this context |
java.util.Set |
leaveScope()
Leaves the current scope |
void |
set(java.lang.String name,
java.lang.Object value)
Sets the value of a defined variable |
void |
setConstant(java.lang.String name,
java.lang.Object value)
Defines a new constant variable in the current scope |
void |
setVariable(java.lang.String name,
java.lang.Object value)
Defines a new variable in the current scope |
Method Detail |
public void enterScope()
public void enterScope(java.util.Set entries)
entries
- a set of stringpublic void defineVariables(java.util.Set vars)
public java.util.Set getCurrentScopeVariables()
public java.util.Set getCurrentScopeVariableNames()
public java.util.Set leaveScope()
public boolean isDefinedVariable(java.lang.String name)
name
- the name of the entrypublic boolean isFinal(java.lang.String name)
name
- the name of the entryjava.lang.IllegalStateException
- if the variable is not definedpublic void define(java.lang.String name, java.lang.Object value)
name
- the name of the new entryvalue
- the value of the entryjava.lang.IllegalStateException
- if the variable is already definedpublic void defineConstant(java.lang.String name, java.lang.Object value)
name
- the name of the new entryvalue
- the value of the entryjava.lang.IllegalStateException
- if the variable is already definedpublic java.lang.Object get(java.lang.String name)
name
- the name of the value to getjava.lang.IllegalStateException
- if the variable is not definedpublic void set(java.lang.String name, java.lang.Object value)
name
- the name of the new entryvalue
- the value of the entryjava.lang.IllegalStateException
- if the variable is not definedpublic void setConstant(java.lang.String name, java.lang.Object value)
name
- the name of the new entryvalue
- the value of the entrypublic void setVariable(java.lang.String name, java.lang.Object value)
name
- the name of the new entryvalue
- the value of the entrypublic java.util.Map getConstants()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |