|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.util.ScriptRunner
This class is used to run BSF scripts
Constructor Summary | |
ScriptRunner()
|
Method Summary | |
void |
addBean(java.lang.String key,
java.lang.Object bean)
Add a single object into the script context. |
void |
addBeans(java.util.Map dictionary)
Add a list of named objects to the list to be exported to the script |
void |
addText(java.lang.String text)
Set the script text. |
void |
executeScript(java.lang.String execName)
Do the work. |
java.lang.String |
getLanguage()
Get the script language |
void |
setLanguage(java.lang.String language)
Defines the language (required). |
void |
setSrc(java.io.File file)
Load the script from an external file ; optional. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ScriptRunner()
Method Detail |
public void addBeans(java.util.Map dictionary)
dictionary
- a map of objects to be placed into the script context
indexed by String names.public void addBean(java.lang.String key, java.lang.Object bean)
key
- the name in the context this object is to stored under.bean
- the object to be stored in the script context.public void executeScript(java.lang.String execName) throws BuildException
execName
- the name that will be passed to BSF for this script
execution.
BuildException
- if someting goes wrong exectuing the script.public void setLanguage(java.lang.String language)
language
- the scripting language name for the script.public java.lang.String getLanguage()
public void setSrc(java.io.File file)
file
- the file containing the script source.public void addText(java.lang.String text)
text
- a component of the script text to be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |