Class KotlinScriptExecutor
java.lang.Object
org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
org.springframework.integration.scripting.jsr223.KotlinScriptExecutor
- All Implemented Interfaces:
ScriptExecutor
public class KotlinScriptExecutor extends AbstractScriptExecutor
An
AbstractScriptExecutor
for the Kotlin scripts support.
Uses KotlinJsr223JvmLocalScriptEngineFactory
directly since there is
no META-INF/services/javax.script.ScriptEngineFactory
file in CLASSPATH.
Also sets an idea.use.native.fs.for.win
system property to false
to disable a native engine discovery for Windows: bay be resolved in the future Kotlin versions.- Since:
- 5.2
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
logger
-
Constructor Summary
Constructors Constructor Description KotlinScriptExecutor()
-
Method Summary
Modifier and Type Method Description protected Object
postProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings)
Subclasses may implement this to provide any special handling requiredMethods inherited from class org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
executeScript, getScriptEngine
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.integration.scripting.ScriptExecutor
executeScript
-
Constructor Details
-
KotlinScriptExecutor
public KotlinScriptExecutor()
-
-
Method Details
-
postProcess
protected Object postProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings)Description copied from class:AbstractScriptExecutor
Subclasses may implement this to provide any special handling required- Specified by:
postProcess
in classAbstractScriptExecutor
- Parameters:
result
- the result.scriptEngine
- the engine.script
- the script.bindings
- the bindings.- Returns:
- modified result
-