org.springframework.scripting.bsh

## 类 BshScriptEvaluator

- java.lang.Object
- - org.springframework.scripting.bsh.BshScriptEvaluator

- 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, ScriptEvaluator

      public class BshScriptEvaluator
      extends Object
      implements ScriptEvaluator, org.springframework.beans.factory.BeanClassLoaderAware

  BeanShell-based implementation of Spring's `ScriptEvaluator` strategy interface.
  从以下版本开始:
    4.0
  作者:
    Juergen Hoeller
  另请参阅:
    `Interpreter.eval(String)`

- - ### 构造器概要

    构造器
    构造器和说明
    `BshScriptEvaluator()` Construct a new BshScriptEvaluator.
    `BshScriptEvaluator(ClassLoader classLoader)` Construct a new BshScriptEvaluator.

  - ### 方法概要

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

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### BshScriptEvaluator

          public BshScriptEvaluator()

      Construct a new BshScriptEvaluator.

    - #### BshScriptEvaluator

          public BshScriptEvaluator(ClassLoader classLoader)

      Construct a new BshScriptEvaluator.
      参数:
        `classLoader` - the ClassLoader to use for the `Interpreter`

  - ### 方法详细资料

    - #### setBeanClassLoader

          public void setBeanClassLoader(ClassLoader classLoader)

      指定者:
        `setBeanClassLoader` 在接口中 `org.springframework.beans.factory.BeanClassLoaderAware`

    - #### evaluate

          @Nullable
          public Object evaluate(ScriptSource script)

      从接口复制的说明: `ScriptEvaluator`
      Evaluate the given script.
      指定者:
        `evaluate` 在接口中 `ScriptEvaluator`
      参数:
        `script` - the ScriptSource for the script to evaluate
      返回:
        the return value of the script, if any

    - #### evaluate

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

      从接口复制的说明: `ScriptEvaluator`
      Evaluate the given script with the given arguments.
      指定者:
        `evaluate` 在接口中 `ScriptEvaluator`
      参数:
        `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