org.springframework.scripting.ScriptFactory |
Known Indirect Subclasses |
Script definition interface, encapsulating the configuration
of a specific script as well as a factory method for
creating the actual scripted Java Object
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the business interfaces that the script is supposed to implement.
| |||||||||||
Return a locator that points to the source of the script.
| |||||||||||
Factory method for creating the scripted Java object.
| |||||||||||
Determine the type of the scripted Java object.
| |||||||||||
Return whether the script requires a config interface to be
generated for it.
| |||||||||||
Determine whether a refresh is required (e.g.
|
Return the business interfaces that the script is supposed to implement.
Can return null
if the script itself determines
its Java interfaces (such as in the case of Groovy).
Return a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
Typical supported locators are Spring resource locations (such as "file:C:/myScript.bsh" or "classpath:myPackage/myScript.bsh") and inline scripts ("inline:myScriptText...").
Factory method for creating the scripted Java object.
Implementations are encouraged to cache script metadata such as a generated script class. Note that this method may be invoked concurrently and must be implemented in a thread-safe fashion.
scriptSource | the actual ScriptSource to retrieve
the script source text from (never null ) |
---|---|
actualInterfaces | the actual interfaces to expose,
including script interfaces as well as a generated config interface
(if applicable; may be null ) |
IOException | if script retrieval failed |
---|---|
ScriptCompilationException | if script compilation failed |
Determine the type of the scripted Java object.
Implementations are encouraged to cache script metadata such as a generated script class. Note that this method may be invoked concurrently and must be implemented in a thread-safe fashion.
scriptSource | the actual ScriptSource to retrieve
the script source text from (never null ) |
---|
null
if none could be determinedIOException | if script retrieval failed |
---|---|
ScriptCompilationException | if script compilation failed |
Return whether the script requires a config interface to be
generated for it. This is typically the case for scripts that
do not determine Java signatures themselves, with no appropriate
config interface specified in getScriptInterfaces()
.
Determine whether a refresh is required (e.g. through
ScriptSource's isModified()
method).
scriptSource | the actual ScriptSource to retrieve
the script source text from (never null ) |
---|
getScriptedObject(ScriptSource, Class[])
call is required