public class StackContext extends Object implements Serializable
Constructor and Description |
---|
StackContext() |
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(String string)
Parse and evaluate the given Stoex using the current stackframe on top of the stack
|
<T> T |
evaluate(String string,
Class<T> expectedType)
Parse and evaluate the given Stoex
|
Object |
evaluate(String stoex,
SimulatedStackframe<Object> currentFrame)
Parse and evaluate the given Stoex
|
void |
evaluateInner(SimulatedStackframe<Object> frame,
String variablename)
Evaluate all EvaluationProxies starting with "variable name" and store the results in the
given stack frame
|
static Object |
evaluateStatic(String stoex)
Parse and evaluate the given Stoex
|
static <T> T |
evaluateStatic(String string,
Class<T> expectedType)
Parse and evaluate the given Stoex
|
static <T> T |
evaluateStatic(String string,
Class<T> expectedType,
SimulatedStackframe<Object> frame)
Parse and evaluate the given Stoex
|
static <T> T |
evaluateStatic(String string,
Class<T> expectedType,
SimulatedStackframe<Object> frame,
VariableMode mode)
Parse and evaluate the given Stoex
|
static Object |
evaluateStatic(String stoex,
SimulatedStackframe<Object> currentFrame)
Parse and evaluate the given Stoex
|
static Object |
evaluateStatic(String stoex,
SimulatedStackframe<Object> currentFrame,
VariableMode mode)
Parse and evaluate the given Stoex
|
VariableMode |
getEvaluationMode() |
SimulatedStack<Object> |
getStack() |
void |
setEvaluationMode(VariableMode mode)
Set the evaluation method
|
public <T> T evaluate(String string, Class<T> expectedType)
string
- Stoex to evaluateexpectedType
- Type expected by the evaluation. It tries to case the type when needed. If the
type cannot be case, an evaluation exception is thrownpublic Object evaluate(String string)
string
- Stoex to evaluatepublic Object evaluate(String stoex, SimulatedStackframe<Object> currentFrame)
string
- Stoex to evaluatecurrentFrame
- The Stackframe under which the evaluation is performedpublic static Object evaluateStatic(String stoex)
string
- Stoex to evaluatepublic static Object evaluateStatic(String stoex, SimulatedStackframe<Object> currentFrame)
string
- Stoex to evaluatecurrentFrame
- The Stackframe under which the evaluation is performedpublic static Object evaluateStatic(String stoex, SimulatedStackframe<Object> currentFrame, VariableMode mode)
string
- Stoex to evaluatecurrentFrame
- The Stackframe under which the evaluation is performedmode
- Evaluation mode to usepublic static <T> T evaluateStatic(String string, Class<T> expectedType)
string
- Stoex to evaluateexpectedType
- Type expected by the evaluation. It tries to case the type when needed. If the
type cannot be case, an evaluation exception is thrownpublic static <T> T evaluateStatic(String string, Class<T> expectedType, SimulatedStackframe<Object> frame)
string
- Stoex to evaluateexpectedType
- Type expected by the evaluation. It tries to case the type when needed. If the
type cannot be case, an evaluation exception is thrownframe
- Stackframe to be used in the evaluationpublic static <T> T evaluateStatic(String string, Class<T> expectedType, SimulatedStackframe<Object> frame, VariableMode mode)
string
- Stoex to evaluateexpectedType
- Type expected by the evaluation. It tries to case the type when needed. If the
type cannot be case, an evaluation exception is thrownframe
- Stackframe to be used in the evaluationmode
- Evaluation mode to usepublic void evaluateInner(SimulatedStackframe<Object> frame, String variablename)
frame
- The frame which stores the evaluated proxy resultsvariablename
- public SimulatedStack<Object> getStack()
public VariableMode getEvaluationMode()
public void setEvaluationMode(VariableMode mode)
mode
- The new evaluation method to set