it.haefelinger.flaka
Class When
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
it.haefelinger.flaka.Task
it.haefelinger.flaka.When
- All Implemented Interfaces:
- Cloneable, TaskContainer
- Direct Known Subclasses:
- Unless
public class When
- extends Task
- implements TaskContainer
A task to simulate a else-less if statement.
- Since:
- 1.0
- Author:
- merzedes
| Fields inherited from class it.haefelinger.flaka.Task |
debug, el |
|
Constructor Summary |
When()
|
|
Method Summary |
void |
addTask(Task task)
|
protected boolean |
eval()
Evalutes the internal test condition. |
void |
exec()
Executes the when body. |
void |
execute()
Evalutes the test condition and if true, executes the body. |
void |
setTest(String s)
The test that must evaluate to true in order to execute the body. |
| Methods inherited from class it.haefelinger.flaka.Task |
debug, debug, error, error, getProperty, getref, info, log, setDebug, setEl, throwbx, throwbx, toFile, verbose, warn, warn |
| 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 |
test
protected String test
tasklist
protected List tasklist
When
public When()
setTest
public void setTest(String s)
- The test that must evaluate to true in order to execute the body.
addTask
public void addTask(Task task)
- Specified by:
addTask in interface TaskContainer
eval
protected boolean eval()
throws BuildException
- Evalutes the internal test condition.
- Returns:
- true if the condition evalutes to true of if no condition is given.
- Throws:
BuildException
exec
public void exec()
throws BuildException
- Executes the when body.
- Throws:
BuildException
execute
public void execute()
throws BuildException
- Evalutes the test condition and if true, executes the body.
- Overrides:
execute in class Task
- Throws:
BuildException- See Also:
Sequential.execute()