1 18 package org.apache.tools.ant.taskdefs; 19 20 import java.util.Iterator ; 21 import java.util.Vector ; 22 import org.apache.tools.ant.BuildException; 23 import org.apache.tools.ant.Task; 24 import org.apache.tools.ant.TaskContainer; 25 26 39 public class Sequential extends Task implements TaskContainer { 40 41 42 private Vector nestedTasks = new Vector (); 43 44 50 public void addTask(Task nestedTask) { 51 nestedTasks.addElement(nestedTask); 52 } 53 54 59 public void execute() throws BuildException { 60 for (Iterator i = nestedTasks.iterator(); i.hasNext();) { 61 Task nestedTask = (Task) i.next(); 62 nestedTask.perform(); 63 } 64 } 65 } 66 | Popular Tags |