peterreilly    2003/12/19 07:13:02

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional
                        ReplaceRegExp.java
  Log:
  Add a setbyline(boolean) as well as a setbyline(String) to replaceregexp
  PR:  25653
  Obtained from: Jesse Glick
  
  Revision  Changes    Path
  1.31      +12 -0     
ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
  
  Index: ReplaceRegExp.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ReplaceRegExp.java        14 Oct 2003 13:19:53 -0000      1.30
  +++ ReplaceRegExp.java        19 Dec 2003 15:13:02 -0000      1.31
  @@ -242,6 +242,7 @@
        * want to only replace the first occurrence of a regular expression on
        * each line, which is not easy to do when processing the file as a 
whole.
        * Defaults to <i>false</i>.</td>
  +     * @deprecated - use setByLine(boolean)
        */
       public void setByLine(String byline) {
           Boolean res = Boolean.valueOf(byline);
  @@ -250,6 +251,17 @@
               res = Boolean.FALSE;
           }
           this.byline = res.booleanValue();
  +    }
  +
  +    /**
  +     * Process the file(s) one line at a time, executing the replacement
  +     * on one line at a time.  This is useful if you
  +     * want to only replace the first occurrence of a regular expression on
  +     * each line, which is not easy to do when processing the file as a 
whole.
  +     * Defaults to <i>false</i>.</td>
  +     */
  +    public void setByLine(boolean byline) {
  +        this.byline = byline;
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to