axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsi...@apache.org
Subject cvs commit: xml-axis/java/tools/org/apache/axis/tools/ant/foreach ParamSet.java ParamItem.java ForeachTask.java
Date Tue, 10 Sep 2002 20:49:32 GMT
rsitze      2002/09/10 13:49:32

  Modified:    java/tools/org/apache/axis/tools/ant/foreach ParamSet.java
                        ParamItem.java ForeachTask.java
  Log:
  
  
  Revision  Changes    Path
  1.2       +13 -5     xml-axis/java/tools/org/apache/axis/tools/ant/foreach/ParamSet.java
  
  Index: ParamSet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/tools/org/apache/axis/tools/ant/foreach/ParamSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParamSet.java	10 Sep 2002 19:20:05 -0000	1.1
  +++ ParamSet.java	10 Sep 2002 20:49:32 -0000	1.2
  @@ -65,8 +65,16 @@
   /**
    * Inner class stores sets of <param>s.
    * It can hold <fileset>s or <item>s or both.
  + * 
  + * @author <a href="mailto:tpv@spamcop.net">Tim Vernum</a>
  + * @author Davanum Srinivas
  + * @author Richard A. Sitze
    */
   public class ParamSet {
  +    public static final String TYPE_FILE = "file".intern();
  +    public static final String TYPE_DIR  = "dir".intern();
  +    public static final String TYPE_BOTH = "both".intern();
  +
       /**
        * Enumerated attribute with the values "file", "dir" and "both"
        * for the type attribute.
  @@ -74,13 +82,13 @@
       public static class FileDirBoth extends EnumeratedAttribute {
           public String[] getValues() {
               return new String[]{
  -                "file", "dir", "both"
  +                TYPE_FILE, TYPE_DIR, TYPE_BOTH
               };
           }
       }
   
       /** Defaults to "file". */
  -    protected String type = "file";
  +    protected String type = TYPE_FILE;
       private Vector filesets;
       private Vector items;
       private String name;
  @@ -118,13 +126,13 @@
               FileSet fileSet = (FileSet) enum.nextElement();
               File base = fileSet.getDir(project);
               DirectoryScanner scanner = fileSet.getDirectoryScanner(project);
  -            if (!"dir".equals(type)) {
  +            if (TYPE_DIR != type) {
                   String[] files = getFiles(base, scanner);
                   for (int j = 0; j < files.length; j++) {
                       values.addElement(files[j]);
                   }
               }
  -            if (!"file".equals(type)) {
  +            if (TYPE_FILE != type) {
                   String[] dirs = getDirs(base, scanner);
                   for (int j = 0; j < dirs.length; j++) {
                       values.addElement(dirs[j]);
  @@ -143,7 +151,7 @@
        * Shall the command work only on files, directories or both?
        */
       public void setType(FileDirBoth type) {
  -        this.type = type.getValue();
  +        this.type = type.getValue().intern();
       }
   
       /**
  
  
  
  1.2       +3 -0      xml-axis/java/tools/org/apache/axis/tools/ant/foreach/ParamItem.java
  
  Index: ParamItem.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/tools/org/apache/axis/tools/ant/foreach/ParamItem.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParamItem.java	10 Sep 2002 19:20:05 -0000	1.1
  +++ ParamItem.java	10 Sep 2002 20:49:32 -0000	1.2
  @@ -55,6 +55,9 @@
   
   /**
    * Inner class stores <item>s with <param> lists
  + * 
  + * @author <a href="mailto:tpv@spamcop.net">Tim Vernum</a>
  + * @author Davanum Srinivas
    */
   public class ParamItem {
       private String value;
  
  
  
  1.3       +2 -0      xml-axis/java/tools/org/apache/axis/tools/ant/foreach/ForeachTask.java
  
  Index: ForeachTask.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/tools/org/apache/axis/tools/ant/foreach/ForeachTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ForeachTask.java	10 Sep 2002 19:20:05 -0000	1.2
  +++ ForeachTask.java	10 Sep 2002 20:49:32 -0000	1.3
  @@ -89,7 +89,9 @@
    * in <code>ExecuteOn</code>.  It allows the user
    * to specify whether directories, files, or both directories and files
    * from the filesets are included as entries in the parameter set.
  + * 
    * @author <a href="mailto:tpv@spamcop.net">Tim Vernum</a>
  + * @author Davanum Srinivas
    */
   public class ForeachTask extends Task {
       private Ant callee;
  
  
  

Mime
View raw message