Top Description Methods
org.springframework.scripting

public Interface ScriptSource

Known Direct Implementers
org.springframework.scripting.support.ResourceScriptSource, org.springframework.scripting.support.StaticScriptSource
Imports
java.io.IOException, org.springframework.lang.Nullable

Interface that defines the source of a script. Tracks whether the underlying script has been modified.
Authors
Rob Harrop, Juergen Hoeller
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the script text
getScriptAsString
()

Retrieve the current script source text as String.

public boolean

Returns:

whether the script data has been modified
isModified
()

Indicate whether the underlying script data has been modified since the last time getScriptAsString() was called.

public String

Returns:

the suggested class name, or null if none available
suggestedClassName
()

Determine a class name for the underlying script.

Method Detail

getScriptAsStringback to summary
public String getScriptAsString() throws IOException

Retrieve the current script source text as String.

Returns:String

the script text

Exceptions
IOException:
if script retrieval failed
isModifiedback to summary
public 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:boolean

whether the script data has been modified

suggestedClassNameback to summary
public String suggestedClassName()

Determine a class name for the underlying script.

Returns:String

the suggested class name, or null if none available

Annotations
@Nullable