KotlinScriptEngine
Executes Kotlin scripts in runtime.
Built on top of the official Kotlin scripting host from the kotlin-scripting-jvm-host package.
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.
Sets the package of the future scripts to name.