Class ConditionBase
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.taskdefs.condition.ConditionBase
- All Implemented Interfaces:
- Cloneable
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.
- Since:
- Ant 1.4
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedSimple constructor.protectedConditionBase(String taskName) Constructor that takes the name of the task in the task name.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd an arbitrary conditionvoidAdd an <and> condition "container".voidAdd an <available> condition.voidAdd an <checksum> condition.voidaddContains(Contains test) Add a <contains> condition.voidAdd an <equals> condition.voidaddFilesMatch(FilesMatch test) Add a <filesmatch> condition.voidAdd an <http> condition.voidaddIsFalse(IsFalse test) Add a <isfalse> condition.voidAdd an <isfileselected> condition.voidAdd an <isreference> condition.voidAdd an <isset> condition.voidAdd a <istrue> condition.voidAdd an <not> condition "container".voidAdd an <or> condition "container".voidAdd an <os> condition.voidAdd a <socket> condition.voidAdd an <uptodate> condition.protected intCount the conditions.protected final Enumeration<Condition> Iterate through all conditions.Returns the name to use in logging messages.voidsetTaskName(String name) Sets the name to use in logging messages.Methods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
- 
Constructor Details- 
ConditionBaseprotected ConditionBase()Simple constructor.
- 
ConditionBaseConstructor that takes the name of the task in the task name.- Parameters:
- taskName- the name of the task.
- Since:
- Ant 1.7
 
 
- 
- 
Method Details- 
countConditionsprotected int countConditions()Count the conditions.- Returns:
- the number of conditions in the container
- Since:
- 1.1
 
- 
getConditionsIterate through all conditions.- Returns:
- an enumeration to use for iteration
- Since:
- 1.1
 
- 
setTaskNameSets the name to use in logging messages.- Parameters:
- name- The name to use in logging messages. Should not be- null.
- Since:
- Ant 1.7
 
- 
getTaskNameReturns the name to use in logging messages.- Returns:
- the name to use in logging messages.
- Since:
- Ant 1.7
 
- 
addAvailableAdd an <available> condition.- Parameters:
- a- an available condition
- Since:
- 1.1
 
- 
addChecksumAdd an <checksum> condition.- Parameters:
- c- a Checksum condition
- Since:
- 1.4, Ant 1.5
 
- 
addUptodateAdd an <uptodate> condition.- Parameters:
- u- an UpToDate condition
- Since:
- 1.1
 
- 
addNotAdd an <not> condition "container".- Parameters:
- n- a Not condition
- Since:
- 1.1
 
- 
addAndAdd an <and> condition "container".- Parameters:
- a- an And condition
- Since:
- 1.1
 
- 
addOrAdd an <or> condition "container".- Parameters:
- o- an Or condition
- Since:
- 1.1
 
- 
addEqualsAdd an <equals> condition.- Parameters:
- e- an Equals condition
- Since:
- 1.1
 
- 
addOs
- 
addIsSetAdd an <isset> condition.- Parameters:
- i- an IsSet condition
- Since:
- Ant 1.5
 
- 
addHttpAdd an <http> condition.- Parameters:
- h- an Http condition
- Since:
- Ant 1.5
 
- 
addSocketAdd a <socket> condition.- Parameters:
- s- a Socket condition
- Since:
- Ant 1.5
 
- 
addFilesMatchAdd a <filesmatch> condition.- Parameters:
- test- a FilesMatch condition
- Since:
- Ant 1.5
 
- 
addContainsAdd a <contains> condition.- Parameters:
- test- a Contains condition
- Since:
- Ant 1.5
 
- 
addIsTrueAdd a <istrue> condition.- Parameters:
- test- an IsTrue condition
- Since:
- Ant 1.5
 
- 
addIsFalseAdd a <isfalse> condition.- Parameters:
- test- an IsFalse condition
- Since:
- Ant 1.5
 
- 
addIsReferenceAdd an <isreference> condition.- Parameters:
- i- an IsReference condition
- Since:
- Ant 1.6
 
- 
addIsFileSelectedAdd an <isfileselected> condition.- Parameters:
- test- the condition
 
- 
add
 
-