org.springframework.scripting

## 接口 ScriptEvaluator

- 所有已知实现类:
    BshScriptEvaluator, GroovyScriptEvaluator, StandardScriptEvaluator

      public interface ScriptEvaluator

  Spring's strategy interface for evaluating a script.

  Aside from language-specific implementations, Spring also ships a version based on the standard `javax.script` package (JSR-223): `StandardScriptEvaluator`.

  从以下版本开始:
    4.0
  作者:
    Juergen Hoeller, Costin Leau

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | `evaluate(ScriptSource script)` Evaluate the given script.
    `Object` | `evaluate(ScriptSource script, Map<String,Object> arguments)` Evaluate the given script with the given arguments.

- - ### 方法详细资料

    - #### evaluate

          @Nullable
          Object evaluate(ScriptSource script)
                              throws ScriptCompilationException

      Evaluate the given script.
      参数:
        `script` - the ScriptSource for the script to evaluate
      返回:
        the return value of the script, if any
      抛出:
        `ScriptCompilationException` - if the evaluator failed to read, compile or evaluate the script

    - #### evaluate

          @Nullable
          Object evaluate(ScriptSource script,
                                     @Nullable
                                     Map<String,Object> arguments)
                              throws ScriptCompilationException

      Evaluate the given script with the given arguments.
      参数:
        `script` - the ScriptSource for the script to evaluate
        `arguments` - the key-value pairs to expose to the script, typically as script variables (may be `null` or empty)
      返回:
        the return value of the script, if any
      抛出:
        `ScriptCompilationException` - if the evaluator failed to read, compile or evaluate the script