Package org.apache.tools.ant.taskdefs
Class ResourceCount
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.ResourceCount
-
Field Summary
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the ResourceCollection to count.boolean
eval()
Fulfill the condition contract.void
execute()
Execute as a Task.void
setCount
(int c) Set the target count number for use as a Condition.void
Set the name of the property to set in task mode.void
Set the ResourceCollection reference.void
Set the comparison for use as a Condition.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, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
ResourceCount
public ResourceCount()
-
-
Method Details
-
add
Add the ResourceCollection to count.- Parameters:
r
- the ResourceCollection to count.- Throws:
BuildException
- if already set.
-
setRefid
Set the ResourceCollection reference.- Parameters:
r
- the Reference.
-
execute
-
eval
public boolean eval()Fulfill the condition contract.- Specified by:
eval
in interfaceCondition
- Returns:
- true if the specified ResourceCollection satisfies the set criteria.
- Throws:
BuildException
- if an error occurs.
-
setCount
public void setCount(int c) Set the target count number for use as a Condition.- Parameters:
c
- number of Resources as int.
-
setWhen
Set the comparison for use as a Condition.- Parameters:
c
- Comparison (an EnumeratedAttribute) When.- See Also:
-
setProperty
Set the name of the property to set in task mode.- Parameters:
p
- the property name to set.
-