public class ConditionTask extends ConditionBase
This task supports boolean logic as well as pluggable conditions to decide, whether a property should be set.
This task does not extend Task to take advantage of ConditionBase.
description, location, project
Constructor and Description |
---|
ConditionTask()
Constructor, names this task "condition".
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
See whether our nested condition holds and set the property.
|
void |
setElse(java.lang.Object alt)
The value for the property to set, if condition evaluates to false.
|
void |
setElse(java.lang.String e)
The value for the property to set, if condition evaluates to false.
|
void |
setProperty(java.lang.String p)
The name of the property to set.
|
void |
setValue(java.lang.Object value)
The value for the property to set, if condition evaluates to true.
|
void |
setValue(java.lang.String v)
The value for the property to set, if condition evaluates to true.
|
add, addAnd, addAvailable, addChecksum, addContains, addEquals, addFilesMatch, addHttp, addIsFalse, addIsFileSelected, addIsReference, addIsSet, addIsTrue, addNot, addOr, addOs, addSocket, addUptodate, countConditions, getConditions, getTaskName, setTaskName
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public void setProperty(java.lang.String p)
p
- the name of the propertypublic void setValue(java.lang.Object value)
value
- the (Object) value of the propertypublic void setValue(java.lang.String v)
v
- the value of the propertypublic void setElse(java.lang.Object alt)
alt
- the alternate value of the property.public void setElse(java.lang.String e)
e
- the alternate value of the property.public void execute() throws BuildException
BuildException
- if an error occurs