Baseclass for the <condition> task as well as several
conditions - ensures that the types of conditions inside the task
and the "container" conditions are in sync.
add
public void add(Condition c)
Add an arbitrary condition
addAnd
public void addAnd(And a)
Add an <and> condition "container".
addAvailable
public void addAvailable(Available a)
Add an <available> condition.
a - an available condition
addChecksum
public void addChecksum(Checksum c)
Add an <checksum> condition.
addContains
public void addContains(Contains test)
Add a <contains> condition.
test - a Contains condition
addEquals
public void addEquals(Equals e)
Add an <equals> condition.
addFilesMatch
public void addFilesMatch(FilesMatch test)
Add a <filesmatch> condition.
test - a FilesMatch condition
addHttp
public void addHttp(Http h)
Add an <http> condition.
addIsFalse
public void addIsFalse(IsFalse test)
Add a <isfalse> condition.
test - an IsFalse condition
addIsFileSelected
public void addIsFileSelected(IsFileSelected test)
Add an <isfileselected> condition.
addIsReference
public void addIsReference(IsReference i)
Add an <isreference> condition.
i - an IsReference condition
addIsSet
public void addIsSet(IsSet i)
Add an <isset> condition.
addIsTrue
public void addIsTrue(IsTrue test)
Add a <istrue> condition.
test - an IsTrue condition
addNot
public void addNot(Not n)
Add an <not> condition "container".
addOr
public void addOr(Or o)
Add an <or> condition "container".
addOs
public void addOs(Os o)
Add an <os> condition.
addSocket
public void addSocket(Socket s)
Add a <socket> condition.
addUptodate
public void addUptodate(UpToDate u)
Add an <uptodate> condition.
u - an UpToDate condition
countConditions
protected int countConditions()
Count the conditions.
- the number of conditions in the container
createDynamicElement
public Object createDynamicElement(String name)
since 1.7.1 This method will be removed in Ant 1.8.0.
Until then, ant core will use it, but third party software
should not rely on this method.
Create a dynamically discovered condition. Built-in conditions can
be discovered from the org.apache.tools.ant.taskdefs.condition
antlib.
This is a temporary fix until restricted type are added
in Ant 1.8.0. The purpose of this method is to stop polluting the
global type namespace with new conditionds - or worse adding new
methods to this class.
- createDynamicElement in interface DynamicElement
name - the condition to create.
- the dynamic condition if found, null otherwise.
getConditions
protected final Enumeration getConditions()
Iterate through all conditions.
- an enumeration to use for iteration
getTaskName
public String getTaskName()
Returns the name to use in logging messages.
- the name to use in logging messages.
setTaskName
public void setTaskName(String name)
Sets the name to use in logging messages.
name - The name to use in logging messages.
Should not be null.