|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
net.sweetohm.ant.util.FileTask
net.sweetohm.ant.bsh.BshTask
public class 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 org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
BshTask()
Empty constructor. |
Method Summary | |
---|---|
void |
addText(java.lang.String text)
Add text to the script to process. |
void |
error(java.lang.String message)
|
void |
execute()
Processing method for the task. |
java.io.PrintStream |
getErr()
|
java.io.Reader |
getIn()
|
java.io.PrintStream |
getOut()
|
void |
log(java.lang.String message)
A log method that avoid message mixing with synchronization. |
void |
print(java.lang.String message)
|
void |
println(java.lang.String message)
|
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.sweetohm.ant.util.FileTask |
---|
addFileset, getFiles, setDir, setFile |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
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
public void print(java.lang.String message)
print
in interface bsh.ConsoleInterface
public void error(java.lang.String message)
error
in interface bsh.ConsoleInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |