|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.ResourceCount
public class ResourceCount
Count resources from a ResourceCollection, storing to a property or writing to the log. Can also be used as a Condition.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
ResourceCount()
|
Method Summary | |
---|---|
void |
add(ResourceCollection r)
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 |
setProperty(java.lang.String p)
Set the name of the property to set in task mode. |
void |
setRefid(Reference r)
Set the ResourceCollection reference. |
void |
setWhen(Comparison c)
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 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceCount()
Method Detail |
---|
public void add(ResourceCollection r)
r
- the ResourceCollection to count.
BuildException
- if already set.public void setRefid(Reference r)
r
- the Reference.public void execute()
execute
in class Task
public boolean eval()
eval
in interface Condition
BuildException
- if an error occurs.public void setCount(int c)
c
- number of Resources as int.public void setWhen(Comparison c)
c
- Comparison (an EnumeratedAttribute) When.Comparison
public void setProperty(java.lang.String p)
p
- the property name to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |