|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--net.cafebabe.sat.util.FileTask | +--net.cafebabe.sat.bsh.BshTask
This task executes a Beanshell script within an Ant script. See documentation for this task usage.
Field Summary | |
(package private) java.lang.String[] |
args
The list of arguments to pass to the script. |
(package private) static bsh.Interpreter |
interpreter
The BSH interpreter. |
(package private) boolean |
reset
Reset flag. |
(package private) java.lang.String |
script
The nested script to process. |
Fields inherited from class net.cafebabe.sat.util.FileTask |
|
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
BshTask()
|
Method Summary | |
void |
addText(java.lang.String text)
Add text to the script to process. |
void |
error(java.lang.String message)
Description of the Method |
void |
execute()
Processing method for the task. |
java.io.PrintStream |
getErr()
Gets the err attribute of the BshTask object |
java.io.Reader |
getIn()
Gets the in attribute of the BshTask object |
java.io.PrintStream |
getOut()
Gets the out attribute of the BshTask object |
void |
log(java.lang.String message)
A log method that avoid message mixing with synchronization. |
void |
print(java.lang.String message)
Description of the Method |
void |
println(java.lang.String message)
Description of the Method |
void |
setArgs(java.lang.String args)
Set command line arguments for the script. |
void |
setReset(boolean reset)
Reset flag setter. |
Methods inherited from class net.cafebabe.sat.util.FileTask |
addFileset, getFiles, getNewFiles, newerFilesThan, setDir, setFile |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
boolean reset
true
, the BSH interpreter is
reseted for each script. If it is set to false
, the fields
and functions are persistent between BSH elements (but args are set to
null anyway).
java.lang.String[] args
java.lang.String script
static bsh.Interpreter interpreter
Constructor Detail |
public BshTask()
Method Detail |
public void setReset(boolean reset)
reset
- The flag value.public void setArgs(java.lang.String args)
args
- The coma separated of command line arguments.public void addText(java.lang.String text)
text
- The text to add to the script.public void execute()
execute
in class org.apache.tools.ant.Task
public void log(java.lang.String message)
log
in class org.apache.tools.ant.Task
message
- The message to log.public java.io.Reader getIn()
getIn
in interface bsh.ConsoleInterface
public java.io.PrintStream getOut()
getOut
in interface bsh.ConsoleInterface
public java.io.PrintStream getErr()
getErr
in interface bsh.ConsoleInterface
public void println(java.lang.String message)
println
in interface bsh.ConsoleInterface
message
- Description of the Parameterpublic void print(java.lang.String message)
print
in interface bsh.ConsoleInterface
message
- Description of the Parameterpublic void error(java.lang.String message)
error
in interface bsh.ConsoleInterface
message
- Description of the Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |