public interface

ScriptSource

org.springframework.scripting.ScriptSource
Known Indirect Subclasses

Class Overview

Interface that defines the source of a script. Tracks whether the underlying script has been modified.

Summary

Public Methods
abstract String getScriptAsString()
Retrieve the current script source text as String.
abstract boolean isModified()
Indicate whether the underlying script data has been modified since the last time getScriptAsString() was called.
abstract String suggestedClassName()
Determine a class name for the underlying script.

Public Methods

public abstract String getScriptAsString ()

Retrieve the current script source text as String.

Returns
  • the script text
Throws
IOException if script retrieval failed

public abstract 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.

Returns
  • whether the script data has been modified

public abstract String suggestedClassName ()

Determine a class name for the underlying script.

Returns
  • the suggested class name, or null if none available