API changes
Support for Compilable
for separate compilation + evaluation
The jshell-scriptengine
supports now the Compilable
interface.
If the same script needs to be evaluated multiple times with different
variable bindings then it is much faster to compile the script only once
and evaluate the compiled script multiple times.
Bugfixes
Close JShell
instance after evaluation
In order to free resources the JShell instance is now closed after
evaluation.
Examples
Note: The example code is available on github, but not part of the
jshell-scriptengine
library.
Added ScriptEngineExample.runJShellCompileExample()
example method
The ScriptEngineExample
contains now an example separate compilation
and evaluation.
Added ScriptEnginePerformance
example class
The ScriptEnginePerformance
measures the performance of code snippets
using the JShellScriptEngine
.