| java.lang.Object org.springframework.scripting.groovy.GroovyScriptFactory
Constructor Summary | |
public | GroovyScriptFactory(String scriptSourceLocator) Create a new GroovyScriptFactory for the given script source. | public | GroovyScriptFactory(String scriptSourceLocator, GroovyObjectCustomizer groovyObjectCustomizer) Create a new GroovyScriptFactory for the given script source,
specifying a strategy interface that can create a custom MetaClass
to supply missing methods and otherwise change the behavior of the object. |
GroovyScriptFactory | public GroovyScriptFactory(String scriptSourceLocator)(Code) | | Create a new GroovyScriptFactory for the given script source.
We don't need to specify script interfaces here, since
a Groovy script defines its Java interfaces itself.
Parameters: scriptSourceLocator - a locator that points to the source of the script.Interpreted by the post-processor that actually creates the script. |
GroovyScriptFactory | public GroovyScriptFactory(String scriptSourceLocator, GroovyObjectCustomizer groovyObjectCustomizer)(Code) | | Create a new GroovyScriptFactory for the given script source,
specifying a strategy interface that can create a custom MetaClass
to supply missing methods and otherwise change the behavior of the object.
We don't need to specify script interfaces here, since
a Groovy script defines its Java interfaces itself.
Parameters: scriptSourceLocator - a locator that points to the source of the script.Interpreted by the post-processor that actually creates the script. Parameters: groovyObjectCustomizer - a customizer that can set a custom metaclassor make other changes to the GroovyObject created by this factory(may be null ) |
executeScript | protected Object executeScript(ScriptSource scriptSource, Class scriptClass) throws ScriptCompilationException(Code) | | Instantiate the given Groovy script class and run it if necessary.
Parameters: scriptSource - the source for the underlying script Parameters: scriptClass - the Groovy script class the result object (either an instance of the script classor the result of running the script instance) throws: ScriptCompilationException - in case of instantiation failure |
getScriptInterfaces | public Class[] getScriptInterfaces()(Code) | | Groovy scripts determine their interfaces themselves,
hence we don't need to explicitly expose interfaces here.
null always |
getScriptSourceLocator | public String getScriptSourceLocator()(Code) | | |
requiresConfigInterface | public boolean requiresConfigInterface()(Code) | | Groovy scripts do not need a config interface,
since they expose their setters as public methods.
|
|
|