KotlinScriptEngine
Executes Kotlin scripts in runtime.
Wraps around the official implementation of the JSR-223 ScriptEngine for the Kotlin language.
Properties
Direct reference to the wrapped JSR-223 ScriptEngine.
Functions
Executes the selected scriptFile. Returns the last script's expression as the result. If unable to execute the script, ScriptEngineException will be thrown.
Executes the selected script. Returns the last script's expression as the result. If unable to execute the script, ScriptEngineException will be thrown.
Executes the selected scriptFile and returns an instance of T. If the script is not an instance of T, ClassCastException will be thrown. If unable to execute the script, ScriptEngineException will be thrown.
Executes the selected script and returns an instance of T. If the script is not an instance of T, ClassCastException will be thrown. If unable to execute the script, ScriptEngineException will be thrown.
Executes the selected scriptFile on the receiver object. The receiver will be available as this
throughout the script, as well as under the value of receiverVariableName. If no variable name is given, it will be chosen randomly.
Executes the selected script on the receiver object. The receiver will be available as this
throughout the script, as well as under the value of receiverVariableName. If no variable name is given, it will be chosen randomly.
Sets the package of the future scripts to name.