Interface ScriptExecutor

All Known Implementing Classes:
AbstractScriptExecutor, DefaultScriptExecutor, KotlinScriptExecutor, PythonScriptExecutor, RubyScriptExecutor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface ScriptExecutor
A script evaluation abstraction against ScriptSource and optional binding variables.
Since:
2.1
  • Method Summary

    Modifier and Type Method Description
    default java.lang.Object executeScript​(org.springframework.scripting.ScriptSource scriptSource)
    Execute a script from the provided ScriptSource
    java.lang.Object executeScript​(org.springframework.scripting.ScriptSource scriptSource, java.util.Map<java.lang.String,​java.lang.Object> variables)
    Execute a script from the provided ScriptSource with an optional binding variables.
  • Method Details

    • executeScript

      @Nullable java.lang.Object executeScript​(org.springframework.scripting.ScriptSource scriptSource, @Nullable java.util.Map<java.lang.String,​java.lang.Object> variables)
      Execute a script from the provided ScriptSource with an optional binding variables.
      Parameters:
      scriptSource - The script source.
      variables - The variables.
      Returns:
      The result of the execution.
    • executeScript

      @Nullable default java.lang.Object executeScript​(org.springframework.scripting.ScriptSource scriptSource)
      Execute a script from the provided ScriptSource
      Parameters:
      scriptSource - The script source.
      Returns:
      The result of the execution.