Modifier and Type | Field and Description |
---|---|
private static VariableFactory |
ourInstance |
static java.util.Map<java.lang.String,Variable> |
varnameToVariable |
Modifier | Constructor and Description |
---|---|
private |
VariableFactory() |
Modifier and Type | Method and Description |
---|---|
static VariableFactory |
getInstance()
There should only be one VariableFactory
|
static Variable |
getVariable(IdentifierToken idToken)
Determines the variable represented by the given id
|
static java.util.Map<java.lang.String,Variable> |
getVariables() |
java.lang.Object |
value(java.lang.String name)
If there are local/global variables, a variable might have a different
value depending on the Context, so Contexts should support determining
the value of an identifier.
|
private static VariableFactory ourInstance
public static java.util.Map<java.lang.String,Variable> varnameToVariable
public static VariableFactory getInstance()
public static Variable getVariable(IdentifierToken idToken)
idToken
- - an identifier tokenpublic static java.util.Map<java.lang.String,Variable> getVariables()
public java.lang.Object value(java.lang.String name)
Context