public final class VariableContext extends Object
| Constructor and Description |
|---|
VariableContext() |
VariableContext(VariableContext ctx,
Arguments callArgs)
Create new VariableContext that will contain only variables from call arguments.
|
VariableContext(VariableContext ctx,
Arguments callParameters,
FormalParameters formalParameters)
Create new variable context for diving into another function.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getKeys()
Get keys of all variables in this context.
|
Object |
getValue(String variableName)
Get value stored in the
|
boolean |
hasVariable(String variableName) |
Object |
put(String parameterName,
Object value)
Put another variable into this context
|
int |
size() |
String |
toString() |
public VariableContext()
public VariableContext(VariableContext ctx, Arguments callArgs)
callArgs - public VariableContext(VariableContext ctx, Arguments callParameters, FormalParameters formalParameters)
ctx - callParameters - formalParameters - public Object put(String parameterName, Object value)
parameterName - name of new parametervalue - value of parameterpublic String[] getKeys()
public Object getValue(String variableName)
variableName - IllegalArgumentException - If such variable is not present.public int size()
public boolean hasVariable(String variableName)
Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.