接口 ScriptSource

所有已知实现类:
ResourceScriptSource, StaticScriptSource

public interface ScriptSource
Interface that defines the source of a script. Tracks whether the underlying script has been modified.
从以下版本开始:
4.0
作者:
Rob Harrop, Juergen Hoeller
  • 方法详细资料

    • getScriptAsString

      String getScriptAsString() throws IOException
      Retrieve the current script source text as String.
      返回:
      the script text
      抛出:
      IOException - if script retrieval failed
    • isModified

      boolean isModified()
      Indicate whether the underlying script data has been modified since the last time getScriptAsString() was called. Returns true if the script has not been read yet.
      返回:
      whether the script data has been modified
    • suggestedClassName

      @Nullable String suggestedClassName()
      Determine a class name for the underlying script.
      返回:
      the suggested class name, or null if none available