Package ise.antelope.tasks
Class BooleanConditionTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.apache.tools.ant.TaskAdapter
-
- ise.antelope.tasks.BooleanConditionTask
-
- All Implemented Interfaces:
java.lang.Cloneable
,org.apache.tools.ant.TypeAdapter
public class BooleanConditionTask extends org.apache.tools.ant.TaskAdapter
Wraps a ConditionBase so that the If task can use standard Ant Conditions as its evaluated boolean expression. Wrapping like this means that future additions to ConditionBase will automatically be picked up without modifying this class.- Version:
- $Revision: 138 $
-
-
Constructor Summary
Constructors Constructor Description BooleanConditionTask()
Constructor for BooleanConditionTask
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
eval()
Evaluates the condition object.void
execute()
Forwards to eval().java.lang.Object
getProxy()
Gets the proxy attribute of the BooleanConditionTask objectvoid
maybeConfigure()
OverridemaybeConfigure
in a way that leaves the nested tasks unconfigured until they get executed.void
setProperty(java.lang.String p)
The name of the property to set.void
setProxy(java.lang.Object proxy)
Sets the proxy attribute of the BooleanConditionTask objectvoid
setValue(java.lang.String v)
The value for the property to set, if condition evaluates to true.-
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, log, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
-
-
-
Method Detail
-
getProxy
public java.lang.Object getProxy()
Gets the proxy attribute of the BooleanConditionTask object- Specified by:
getProxy
in interfaceorg.apache.tools.ant.TypeAdapter
- Overrides:
getProxy
in classorg.apache.tools.ant.TaskAdapter
- Returns:
- The proxy value
-
setProxy
public void setProxy(java.lang.Object proxy)
Sets the proxy attribute of the BooleanConditionTask object- Specified by:
setProxy
in interfaceorg.apache.tools.ant.TypeAdapter
- Overrides:
setProxy
in classorg.apache.tools.ant.TaskAdapter
- Parameters:
proxy
- The new proxy value
-
setProperty
public void setProperty(java.lang.String p)
The name of the property to set. Optional.- Parameters:
p
- The new property value
-
setValue
public void setValue(java.lang.String v)
The value for the property to set, if condition evaluates to true. Defaults to "true".- Parameters:
v
- The new value value
-
maybeConfigure
public void maybeConfigure() throws org.apache.tools.ant.BuildException
OverridemaybeConfigure
in a way that leaves the nested tasks unconfigured until they get executed.- Overrides:
maybeConfigure
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- Description of Exception- Since:
- Ant 1.5
-
execute
public void execute() throws org.apache.tools.ant.BuildException
Forwards to eval().- Overrides:
execute
in classorg.apache.tools.ant.TaskAdapter
- Throws:
org.apache.tools.ant.BuildException
- Description of Exception
-
eval
public boolean eval()
Evaluates the condition object.- Returns:
- true or false, depending on the evaluation of the condition.
-
-