ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: ant/src/etc/testcases/core/containersrc/test SpecialSeq.java
Date Fri, 04 Apr 2003 13:53:18 GMT
conor       2003/04/04 05:53:18

  Added:       src/etc/testcases/core/containersrc/test SpecialSeq.java
  Log:
  New task container test, which fails. This doesn't fail as badly
  under 1.5.x but nevertheless is not functional
  
  Revision  Changes    Path
  1.1                  ant/src/etc/testcases/core/containersrc/test/SpecialSeq.java
  
  Index: SpecialSeq.java
  ===================================================================
  package test;
  
  import org.apache.tools.ant.Task;
  import org.apache.tools.ant.TaskContainer;
  import org.apache.tools.ant.BuildException;
  import org.apache.tools.ant.types.FileSet;
  import java.util.*;
  
  public class SpecialSeq extends Task implements TaskContainer {
      /** Optional Vector holding the nested tasks */
      private Vector nestedTasks = new Vector();
  
      private FileSet fileset;
      
      /**
       * Add a nested task.
       * <p>
       * @param nestedTask  Nested task to execute
       * <p>
       */
      public void addTask(Task nestedTask) {
          nestedTasks.addElement(nestedTask);
      }
  
      /**
       * Execute all nestedTasks.
       */
      public void execute() throws BuildException {
          for (Enumeration e = nestedTasks.elements(); e.hasMoreElements();) {
              Task nestedTask = (Task) e.nextElement();
              nestedTask.perform();
          }
      }
  
      public void addFileset(FileSet fileset) {
          this.fileset = fileset;
      }
  }
  
  
  

Mime
View raw message