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:
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 $
-
Field Summary
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaneval()Evaluates the condition object.voidexecute()Forwards to eval().getProxy()Gets the proxy attribute of the BooleanConditionTask objectvoidOverridemaybeConfigurein a way that leaves the nested tasks unconfigured until they get executed.voidThe name of the property to set.voidSets the proxy attribute of the BooleanConditionTask objectvoidThe value for the property to set, if condition evaluates to true.Methods inherited from class org.apache.tools.ant.TaskAdapter
checkProxyClass, checkTaskClassMethods 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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tools.ant.TypeAdapter
getProject, setProject
-
Constructor Details
-
BooleanConditionTask
public BooleanConditionTask()Constructor for BooleanConditionTask
-
-
Method Details
-
getProxy
Gets the proxy attribute of the BooleanConditionTask object- Specified by:
getProxyin interfaceorg.apache.tools.ant.TypeAdapter- Overrides:
getProxyin classorg.apache.tools.ant.TaskAdapter- Returns:
- The proxy value
-
setProxy
Sets the proxy attribute of the BooleanConditionTask object- Specified by:
setProxyin interfaceorg.apache.tools.ant.TypeAdapter- Overrides:
setProxyin classorg.apache.tools.ant.TaskAdapter- Parameters:
proxy- The new proxy value
-
setProperty
The name of the property to set. Optional.- Parameters:
p- The new property value
-
setValue
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.BuildExceptionOverridemaybeConfigurein a way that leaves the nested tasks unconfigured until they get executed.- Overrides:
maybeConfigurein 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.BuildExceptionForwards to eval().- Overrides:
executein 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.
-