net.sf.antcontrib.logic
public class ForEach extends Task
Usage: Task declaration in the project:<taskdef name="foreach" classname="net.sf.antcontrib.logic.ForEach" />
Call Syntax:<foreach list="values" target="targ" param="name" [parallel="true|false"] [delimiter="delim"] />
Attributes: list --> The list of values to process, with the delimiter character, indicated by the "delim" attribute, separating each value target --> The target to call for each token, passing the token as the parameter with the name indicated by the "param" attribute param --> The name of the parameter to pass the tokens in as to the target delimiter --> The delimiter string that separates the values in the "list" parameter. The default is "," parallel --> Should all targets execute in parallel. The default is false. trim --> Should we trim the list item before calling the target?
Constructor Summary | |
---|---|
ForEach()
Default Constructor |
Method Summary | |
---|---|
void | addFileset(FileSet set) |
void | addParam(Property p)
Corresponds to <antcall> 's nested
<param> element. |
void | addReference(Reference r)
Corresponds to <antcall> 's nested
<reference> element. |
Mapper | createMapper() |
Path | createPath() |
void | execute() |
protected void | handleErrorOutput(String line) |
protected void | handleOutput(String line) |
void | setDelimiter(String delimiter) |
void | setInheritall(boolean b)
Corresponds to <antcall> 's inheritall
attribute. |
void | setInheritrefs(boolean b)
Corresponds to <antcall> 's inheritrefs
attribute. |
void | setList(String list) |
void | setMaxThreads(int maxThreads)
Set the maximum amount of threads we're going to allow
at once to execute |
void | setParallel(boolean parallel) |
void | setParam(String param) |
void | setTarget(String target) |
void | setTrim(boolean trim) |
Deprecated: Use createPath instead.
<antcall>
's nested
<param>
element.<antcall>
's nested
<reference>
element.<antcall>
's inheritall
attribute.<antcall>
's inheritrefs
attribute.Parameters: maxThreads