public void
addBean
(java.lang.String key, java.lang.Object bean)
[Inherited From ScriptRunnerBase]
Add a single object into the script context.
Add a single object into the script context.
Parameters: - key - the name in the context this object is to stored under.
- bean - the object to be stored in the script context.
public void
addBeans
(java.util.Map dictionary)
[Inherited From ScriptRunnerBase]
Add a list of named objects to the list to be exported to the script
Add a list of named objects to the list to be exported to the script
Parameters: - dictionary - a map of objects to be placed into the script context
indexed by String names.
public void
addText
(java.lang.String text)
[Inherited From ScriptRunnerBase]
Set the script text.
Set the script text. Properties in the text are not expanded!
Parameters: - text - a component of the script text to be added.
Bind the runner to a project component. Properties, targets and references are all added as beans; project is bound to project, and self to the component.
Parameters: - component - to become self
Do the work to eval the script.
Returns:
the result of the evaluation
Parameters: - execName - the name that will be passed to the
scripting engine for this script execution.
Throws: - BuildException - if something goes wrong executing the script.
Do the work to run the script.
Parameters: - execName - the name that will be passed to the
scripting engine for this script execution.
Throws: - BuildException - if someting goes wrong exectuing the script.
protected java.util.Map
getBeans
()
[Inherited From ScriptRunnerBase]
Get the beans used for the script.
Get the beans used for the script.
Returns:
the map of beans.
public boolean
getKeepEngine
()
[Inherited From ScriptRunnerBase]
Get the keep engine attribute.
Get the keep engine attribute.
Returns:
the attribute.
public java.lang.String
getLanguage
()
[Inherited From ScriptRunnerBase]
Get the script language
Get the script language
Returns:
the script language
public java.lang.String
getManagerName
()
[Specified in ScriptRunnerBase]
Get the name of the manager prefix.
Get the name of the manager prefix.
Returns:
"javax"
Add a resource to the source list.
Parameters: - sourceResource - the resource to load
Throws: - BuildException - if the resource cannot be read
Since:
Ant 1.7.1
Add all resources in a resource collection to the source list.
Add all resources in a resource collection to the source list.
Parameters: - collection - the resource to load
Throws: - BuildException - if a resource cannot be read
Since:
Ant 1.7.1
protected java.lang.ClassLoader
replaceContextLoader
()
[Inherited From ScriptRunnerBase]
Replace the current context classloader with the
script context classloader.
Replace the current context classloader with the script context classloader.
Returns:
the current context classloader.
protected void
restoreContextLoader
(java.lang.ClassLoader origLoader)
[Inherited From ScriptRunnerBase]
Restore the context loader with the original context classloader.
Restore the context loader with the original context classloader.
script context loader.
Parameters: - origLoader - the original context classloader.
public void
setKeepEngine
(boolean keepEngine)
[Inherited From ScriptRunnerBase]
Whether to keep the script engine between calls.
Whether to keep the script engine between calls.
Parameters: - keepEngine - if true, keep the engine.
public void
setLanguage
(java.lang.String language)
[Inherited From ScriptRunnerBase]
Defines the language (required).
Defines the language (required).
Parameters: - language - the scripting language name for the script.