org.springframework.scripting.support

## 类 StaticScriptSource

- java.lang.Object
- - org.springframework.scripting.support.StaticScriptSource

- 所有已实现的接口:
    ScriptSource

      public class StaticScriptSource
      extends Object
      implements ScriptSource

  Static implementation of the `ScriptSource` interface, encapsulating a given String that contains the script source text. Supports programmatic updates of the script String.
  从以下版本开始:
    2.0
  作者:
    Rob Harrop, Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `StaticScriptSource(String script)` Create a new StaticScriptSource for the given script.
    `StaticScriptSource(String script, String className)` Create a new StaticScriptSource for the given script.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getScriptAsString()` Retrieve the current script source text as String.
    `boolean` | `isModified()` Indicate whether the underlying script data has been modified since the last time `ScriptSource.getScriptAsString()` was called.
    `void` | `setScript(String script)` Set a fresh script String, overriding the previous script.
    `String` | `suggestedClassName()` Determine a class name for the underlying script.
    `String` | `toString()`

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

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

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

    - #### StaticScriptSource

          public StaticScriptSource(String script)

      Create a new StaticScriptSource for the given script.
      参数:
        `script` - the script String

    - #### StaticScriptSource

          public StaticScriptSource(String script,
                                    @Nullable
                                    String className)

      Create a new StaticScriptSource for the given script.
      参数:
        `script` - the script String
        `className` - the suggested class name for the script (may be `null`)

  - ### 方法详细资料

    - #### setScript

          public void setScript(String script)

      Set a fresh script String, overriding the previous script.
      参数:
        `script` - the script String

    - #### getScriptAsString

          public String getScriptAsString()

      从接口复制的说明: `ScriptSource`
      Retrieve the current script source text as String.
      指定者:
        `getScriptAsString` 在接口中 `ScriptSource`
      返回:
        the script text

    - #### isModified

          public boolean isModified()

      从接口复制的说明: `ScriptSource`
      Indicate whether the underlying script data has been modified since the last time `ScriptSource.getScriptAsString()` was called. Returns `true` if the script has not been read yet.
      指定者:
        `isModified` 在接口中 `ScriptSource`
      返回:
        whether the script data has been modified

    - #### suggestedClassName

          @Nullable
          public String suggestedClassName()

      从接口复制的说明: `ScriptSource`
      Determine a class name for the underlying script.
      指定者:
        `suggestedClassName` 在接口中 `ScriptSource`
      返回:
        the suggested class name, or `null` if none available

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`