ScriptUtils

Utility object providing extension functions for ScriptEngine.

Properties

Link copied to clipboard

Returns the engine-scope Bindings for this ScriptEngine. A script context always has them.

Link copied to clipboard

Returns the global-scope Bindings for this ScriptEngine, or null when its context has none, as after resetContext with nullGlobalContext = true.

Functions

Link copied to clipboard
fun ScriptEngine.bindings(scope: Int = ENGINE_SCOPE): Bindings?

Returns the Bindings for the specified scope on this ScriptEngine.

Link copied to clipboard
fun ScriptEngine.resetContext(nullGlobalContext: Boolean = false)

Resets the context of this ScriptEngine by creating a new SimpleScriptContext with fresh bindings.