Expression Evaluation

JSwat supports basic Java expression evaluation in a number of areas. For instance, the print, invoke, and set commands all use the expression evaluator. The expressions are as defined in the Java Language Specification except for the following differences:

Supported operators include (listed in order of precedence):

Making reference to variables and invoking methods in the debuggee is supported when the debugging session is active and the current thread is set and suspended. Otherwise an exception will occur. Naturally, method invocations may include expressions for the method arguments, as well as nested method calls.

Below are some examples of valid expressions: