ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/util ChainReaderHelper.java
Date Wed, 27 Feb 2002 20:48:45 GMT
umagesh     02/02/27 12:48:45

  Modified:    proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters
                        HeadFilter.java LineContains.java PrefixLines.java
                        ReplaceTokens.java StripJavaComments.java
                        StripLineBreaks.java StripLineComments.java
                        TabsToSpaces.java TailFilter.java
               proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/util
                        ChainReaderHelper.java
  Added:       proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters
                        ChainableReader.java
  Removed:     proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters
                        CloneableReader.java
  Log:
  CloneableReader -> ChainableReader
  Reader clone(Reader) -> Reader chain(Reader)
  
  Revision  Changes    Path
  1.6       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/HeadFilter.java
  
  Index: HeadFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/HeadFilter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HeadFilter.java	27 Feb 2002 20:41:37 -0000	1.5
  +++ HeadFilter.java	27 Feb 2002 20:48:44 -0000	1.6
  @@ -79,7 +79,7 @@
    */
   public final class HeadFilter
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       private static final String LINES_KEY = "lines";
   
  @@ -192,7 +192,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           HeadFilter newFilter = new HeadFilter(rdr);
           newFilter.setLines(getLines());
           newFilter.setInitialized(true);
  
  
  
  1.3       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/LineContains.java
  
  Index: LineContains.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/LineContains.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LineContains.java	27 Feb 2002 20:41:37 -0000	1.2
  +++ LineContains.java	27 Feb 2002 20:48:44 -0000	1.3
  @@ -34,7 +34,7 @@
    */
   public final class LineContains
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       private static final String CONTAINS_KEY = "contains";
   
  @@ -160,7 +160,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           LineContains newFilter = new LineContains(rdr);
           newFilter.setContains(getContains());
           newFilter.setInitialized(true);
  
  
  
  1.3       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/PrefixLines.java
  
  Index: PrefixLines.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/PrefixLines.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PrefixLines.java	27 Feb 2002 20:41:37 -0000	1.2
  +++ PrefixLines.java	27 Feb 2002 20:48:44 -0000	1.3
  @@ -26,7 +26,7 @@
    */
   public final class PrefixLines
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       /**
        * prefix key
  @@ -145,7 +145,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           PrefixLines newFilter = new PrefixLines(rdr);
           newFilter.setPrefix(getPrefix());
           newFilter.setInitialized(true);
  
  
  
  1.6       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/ReplaceTokens.java
  
  Index: ReplaceTokens.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/ReplaceTokens.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ReplaceTokens.java	27 Feb 2002 20:41:37 -0000	1.5
  +++ ReplaceTokens.java	27 Feb 2002 20:48:44 -0000	1.6
  @@ -84,7 +84,7 @@
    */
   public final class ReplaceTokens
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       private static final char DEFAULT_BEGIN_TOKEN = '@';
   
  @@ -237,7 +237,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           ReplaceTokens newFilter = new ReplaceTokens(rdr);
           newFilter.setBeginToken(getBeginToken());
           newFilter.setEndToken(getEndToken());
  
  
  
  1.4       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/StripJavaComments.java
  
  Index: StripJavaComments.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/StripJavaComments.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StripJavaComments.java	27 Feb 2002 20:41:37 -0000	1.3
  +++ StripJavaComments.java	27 Feb 2002 20:48:44 -0000	1.4
  @@ -67,7 +67,7 @@
    */
   public final class StripJavaComments
       extends FilterReader
  -    implements CloneableReader
  +    implements ChainableReader
   {
       /**
        * This constructor is a dummy constructor and is
  @@ -167,7 +167,7 @@
           return n;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           StripJavaComments newFilter = new StripJavaComments(rdr);
           return newFilter;
       }
  
  
  
  1.7       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/StripLineBreaks.java
  
  Index: StripLineBreaks.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/StripLineBreaks.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StripLineBreaks.java	27 Feb 2002 20:41:37 -0000	1.6
  +++ StripLineBreaks.java	27 Feb 2002 20:48:44 -0000	1.7
  @@ -75,7 +75,7 @@
    */
   public final class StripLineBreaks
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       /**
        * Linebreaks. What do to on funny IBM mainframes with odd line endings?
  @@ -177,7 +177,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           StripLineBreaks newFilter = new StripLineBreaks(rdr);
           newFilter.setLineBreaks(getLineBreaks());
           newFilter.setInitialized(true);
  
  
  
  1.5       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/StripLineComments.java
  
  Index: StripLineComments.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/StripLineComments.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StripLineComments.java	27 Feb 2002 20:41:37 -0000	1.4
  +++ StripLineComments.java	27 Feb 2002 20:48:44 -0000	1.5
  @@ -37,7 +37,7 @@
    */
   public final class StripLineComments
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       private static final String COMMENTS_KEY = "comment";
   
  @@ -161,7 +161,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           StripLineComments newFilter = new StripLineComments(rdr);
           newFilter.setComments(getComments());
           newFilter.setInitialized(true);
  
  
  
  1.4       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/TabsToSpaces.java
  
  Index: TabsToSpaces.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/TabsToSpaces.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TabsToSpaces.java	27 Feb 2002 20:41:37 -0000	1.3
  +++ TabsToSpaces.java	27 Feb 2002 20:48:44 -0000	1.4
  @@ -79,7 +79,7 @@
    */
   public final class TabsToSpaces
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       private static final int DEFAULT_TAB_LENGTH = 8;
   
  @@ -183,7 +183,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           TabsToSpaces newFilter = new TabsToSpaces(rdr);
           newFilter.setTablength(getTablength());
           newFilter.setInitialized(true);
  
  
  
  1.5       +2 -2      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/TailFilter.java
  
  Index: TailFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/TailFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TailFilter.java	27 Feb 2002 20:41:37 -0000	1.4
  +++ TailFilter.java	27 Feb 2002 20:48:44 -0000	1.5
  @@ -79,7 +79,7 @@
    */
   public final class TailFilter
       extends FilterReader
  -    implements Parameterizable, CloneableReader
  +    implements Parameterizable, ChainableReader
   {
       private static final String LINES_KEY = "lines";
   
  @@ -237,7 +237,7 @@
           return initialized;
       }
   
  -    public final Reader clone(final Reader rdr) {
  +    public final Reader chain(final Reader rdr) {
           TailFilter newFilter = new TailFilter(rdr);
           newFilter.setLines(getLines());
           newFilter.setInitialized(true);
  
  
  
  1.1                  jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/filters/ChainableReader.java
  
  Index: ChainableReader.java
  ===================================================================
  package org.apache.tools.ant.filters;
  
  import java.io.Reader;
  
  public interface ChainableReader {
      public Reader chain(Reader rdr);
  }
  
  
  
  1.5       +3 -3      jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/util/ChainReaderHelper.java
  
  Index: ChainReaderHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/filterreaders/src/main/org/apache/tools/ant/util/ChainReaderHelper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ChainReaderHelper.java	27 Feb 2002 18:14:11 -0000	1.4
  +++ ChainReaderHelper.java	27 Feb 2002 20:48:44 -0000	1.5
  @@ -56,7 +56,7 @@
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.filters.CloneableReader;
  +import org.apache.tools.ant.filters.ChainableReader;
   import org.apache.tools.ant.types.AntFilterReader;
   import org.apache.tools.ant.types.FilterReaderSet;
   import org.apache.tools.ant.types.Path;
  @@ -195,9 +195,9 @@
                               throw new BuildException(ite);
                           }
                       }
  -                } else if (o instanceof CloneableReader &&
  +                } else if (o instanceof ChainableReader &&
                              o instanceof Reader) {
  -                    instream = ((CloneableReader) o).clone(instream);
  +                    instream = ((ChainableReader) o).chain(instream);
                   }
               }
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message