org.apache.tools.ant.util
Class ScriptRunner
java.lang.Object
org.apache.tools.ant.util.ScriptRunner
public class ScriptRunner
extends java.lang.Object
This class is used to run BSF scripts
void | addBean(String key, Object bean) - Add a single object into the script context.
|
void | addBeans(Map dictionary) - Add a list of named objects to the list to be exported to the script
|
void | addText(String text) - Set the script text.
|
void | executeScript(String execName) - Do the work.
|
String | getLanguage() - Get the script language
|
void | setLanguage(String language) - Defines the language (required).
|
void | setSrc(File file) - Load the script from an external file ; optional.
|
addBean
public void addBean(String key,
Object bean)
Add a single object into the script context.
key
- the name in the context this object is to stored under.bean
- the object to be stored in the script context.
addBeans
public void addBeans(Map dictionary)
Add a list of named objects to the list to be exported to the script
dictionary
- a map of objects to be placed into the script context
indexed by String names.
addText
public void addText(String text)
Set the script text.
text
- a component of the script text to be added.
executeScript
public void executeScript(String execName)
throws BuildException
Do the work.
execName
- the name that will be passed to BSF for this script
execution.
getLanguage
public String getLanguage()
Get the script language
setLanguage
public void setLanguage(String language)
Defines the language (required).
language
- the scripting language name for the script.
setSrc
public void setSrc(File file)
Load the script from an external file ; optional.
file
- the file containing the script source.
Copyright B) 2000-2008 Apache Software Foundation. All Rights Reserved.