net.sf.antcontrib.logic.condition

Class BooleanConditionTask

public class BooleanConditionTask extends TaskAdapter implements Condition

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.

Developed for use with Antelope, migrated to ant-contrib Oct 2003.

Version: $Revision: 1.3 $

Author: Dale Anson, danson@germane-software.com

Method Summary
booleaneval()
Evaluates the condition object.
voidexecute()
Forwards to eval().
ObjectgetProxy()
voidmaybeConfigure()
Override org.apache.tools.ant.Task#maybeConfigure maybeConfigure in a way that leaves the nested tasks unconfigured until they get executed.
voidsetProperty(String p)
The name of the property to set.
voidsetProxy(Object proxy)
voidsetValue(String v)
The value for the property to set, if condition evaluates to true.

Method Detail

eval

public boolean eval()
Evaluates the condition object.

Returns: true or false, depending on the evaluation of the condition.

execute

public void execute()
Forwards to eval().

getProxy

public Object getProxy()

maybeConfigure

public void maybeConfigure()
Override org.apache.tools.ant.Task#maybeConfigure maybeConfigure in a way that leaves the nested tasks unconfigured until they get executed.

Since: Ant 1.5

setProperty

public void setProperty(String p)
The name of the property to set. Optional.

setProxy

public void setProxy(Object proxy)

setValue

public void setValue(String v)
The value for the property to set, if condition evaluates to true. Defaults to "true".