|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.scripting.support.StaticScriptSource
public class StaticScriptSource
Static implementation of the
ScriptSource
interface,
encapsulating a given String that contains the script source text.
Supports programmatic updates of the script String.
Constructor Summary | |
---|---|
StaticScriptSource(String script)
Create a new StaticScriptSource for the given script. |
|
StaticScriptSource(String script,
String className)
Create a new StaticScriptSource for the given script. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StaticScriptSource(String script)
script
- the script Stringpublic StaticScriptSource(String script, String className)
script
- the script StringclassName
- the suggested class name for the script
(may be null
)Method Detail |
---|
public void setScript(String script)
script
- the script Stringpublic String getScriptAsString()
ScriptSource
getScriptAsString
in interface ScriptSource
public boolean isModified()
ScriptSource
ScriptSource.getScriptAsString()
was called.
Returns true
if the script has not been read yet.
isModified
in interface ScriptSource
public String suggestedClassName()
ScriptSource
suggestedClassName
in interface ScriptSource
null
if none availablepublic String toString()
toString
in class Object
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |