类 StaticScriptSource
java.lang.Object
cn.taketoday.scripting.support.StaticScriptSource
- 所有已实现的接口:
ScriptSource
Static implementation of the
ScriptSource interface,
encapsulating a given String that contains the script source text.
Supports programmatic updates of the script String.- 从以下版本开始:
- 4.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. -
方法概要
修饰符和类型方法说明Retrieve the current script source text as String.booleanIndicate whether the underlying script data has been modified since the last timeScriptSource.getScriptAsString()was called.voidSet a fresh script String, overriding the previous script.Determine a class name for the underlying script.toString()
-
构造器详细资料
-
StaticScriptSource
Create a new StaticScriptSource for the given script.- 参数:
script- the script String
-
StaticScriptSource
Create a new StaticScriptSource for the given script.- 参数:
script- the script StringclassName- the suggested class name for the script (may benull)
-
-
方法详细资料
-
setScript
Set a fresh script String, overriding the previous script.- 参数:
script- the script String
-
getScriptAsString
从接口复制的说明:ScriptSourceRetrieve the current script source text as String.- 指定者:
getScriptAsString在接口中ScriptSource- 返回:
- the script text
-
isModified
public boolean isModified()从接口复制的说明:ScriptSourceIndicate whether the underlying script data has been modified since the last timeScriptSource.getScriptAsString()was called. Returnstrueif the script has not been read yet.- 指定者:
isModified在接口中ScriptSource- 返回:
- whether the script data has been modified
-
suggestedClassName
从接口复制的说明:ScriptSourceDetermine a class name for the underlying script.- 指定者:
suggestedClassName在接口中ScriptSource- 返回:
- the suggested class name, or
nullif none available
-
toString
-