Package ise.antelope.tasks
Class Foreach
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
ise.antelope.tasks.Foreach
- All Implemented Interfaces:
Cloneable
,org.apache.tools.ant.TaskContainer
public class Foreach
extends org.apache.tools.ant.Task
implements org.apache.tools.ant.TaskContainer
Task container that iterates through a list of values, puts each value into a
property, then executes all nested tasks.
- Since:
- Ant 1.5
- Version:
- $Revision: 132 $
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTask
(org.apache.tools.ant.Task task) Add a nested task to execute.void
execute()
Execute this task and all nested Tasks.void
OverridemaybeConfigure
in a way that leaves the nested tasks unconfigured until they get executed.void
setFailonerror
(boolean fail) Ant boolean, stop the build process if any nested task fails.void
setProperty
(String name) Sets the name of the property to set the value in.void
setSeparator
(String separator) Sets the separator for the values string, defaults to comma.void
setTrim
(boolean trim) If true, will trim whitespace from both ends of the value.void
Sets the values to iterate through.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, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
Foreach
public Foreach()
-
-
Method Details
-
setFailonerror
public void setFailonerror(boolean fail) Ant boolean, stop the build process if any nested task fails. Defaults to true.- Parameters:
fail
- Ant boolean, whether to stop the build on error.
-
setValues
Sets the values to iterate through.- Parameters:
values
- The new values value
-
setSeparator
Sets the separator for the values string, defaults to comma.- Parameters:
separator
- The new separator value
-
setProperty
Sets the name of the property to set the value in.- Parameters:
name
- The new property value
-
setTrim
public void setTrim(boolean trim) If true, will trim whitespace from both ends of the value. Default is false, do not trim.- Parameters:
trim
- The new trim value
-
maybeConfigure
public void maybeConfigure() throws org.apache.tools.ant.BuildExceptionOverridemaybeConfigure
in a way that leaves the nested tasks unconfigured until they get executed.- Overrides:
maybeConfigure
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- Description of Exception- Since:
- Ant 1.5
-
addTask
public void addTask(org.apache.tools.ant.Task task) Add a nested task to execute.- Specified by:
addTask
in interfaceorg.apache.tools.ant.TaskContainer
- Parameters:
task
- Nested task to execute.
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecute this task and all nested Tasks.- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- Description of Exception
-