ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Unpack.java
Date Mon, 14 Mar 2005 11:46:56 GMT
peterreilly    2005/03/14 03:46:56

  Modified:    src/main/org/apache/tools/ant/taskdefs Unpack.java
  Log:
  javadoc + linelength
  
  Revision  Changes    Path
  1.21      +19 -2     ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java
  
  Index: Unpack.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Unpack.java	9 Mar 2004 16:48:06 -0000	1.20
  +++ Unpack.java	14 Mar 2005 11:46:56 -0000	1.21
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2002,2004 The Apache Software Foundation
  + * Copyright  2001-2002,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -39,6 +39,7 @@
        *             mechanism do the work and also to encapsulate operations on
        *             the type in its own class.
        * @ant.attribute ignore="true"
  +     * @param src a <code>String</code> value
        */
       public void setSrc(String src) {
           log("DEPRECATED - The setSrc(String) method has been deprecated."
  @@ -52,6 +53,7 @@
        *             mechanism do the work and also to encapsulate operations on
        *             the type in its own class.
        * @ant.attribute ignore="true"
  +     * @param dest a <code>String</code> value
        */
       public void setDest(String dest) {
           log("DEPRECATED - The setDest(String) method has been deprecated."
  @@ -103,7 +105,8 @@
           int len = sourceName.length();
           if (defaultExtension != null
               && len > defaultExtension.length()
  -            && defaultExtension.equalsIgnoreCase(sourceName.substring(len - defaultExtension.length())))
{
  +            && defaultExtension.equalsIgnoreCase(
  +                sourceName.substring(len - defaultExtension.length()))) {
               dest = new File(dest, sourceName.substring(0,
                                                          len - defaultExtension.length()));
           } else {
  @@ -111,6 +114,10 @@
           }
       }
   
  +    /**
  +     * Execute the task.
  +     * @throws BuildException on error
  +     */
       public void execute() throws BuildException {
           File savedDest = dest; // may be altered in validate
           try {
  @@ -121,6 +128,16 @@
           }
       }
   
  +    /**
  +     * Get the extension.
  +     * This is to be overridden by subclasses.
  +     * @return the default extension.
  +     */
       protected abstract String getDefaultExtension();
  +
  +    /**
  +     * Do the uncompressing.
  +     * This is to be overridden by subclasses.
  +     */
       protected abstract void extract();
   }
  
  
  

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


Mime
View raw message