peterreilly    2005/03/14 09:47:02

  Modified:    src/main/org/apache/tools/ant/types Permissions.java
                        RedirectorElement.java Substitution.java
                        ZipFileSet.java ZipScanner.java
  Log:
  checkstyle: mostly javadoc
  
  Revision  Changes    Path
  1.9       +6 -3      ant/src/main/org/apache/tools/ant/types/Permissions.java
  
  Index: Permissions.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Permissions.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Permissions.java  22 Nov 2004 09:23:36 -0000      1.8
  +++ Permissions.java  14 Mar 2005 17:47:01 -0000      1.9
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2003-2004 The Apache Software Foundation
  + * Copyright  2003-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.
  @@ -86,6 +86,7 @@
        * subject to these Permissions. Note that setting the SecurityManager 
too early may
        * prevent your part from starting, as for instance changing 
classloaders may be prohibited.
        * The classloader for the new situation is supposed to be present.
  +     * @throws BuildException on error
        */
       public void setSecurityManager() throws BuildException {
           origSm = System.getSecurityManager();
  @@ -110,7 +111,8 @@
               if (p.getClassName() == null) {
                   throw new BuildException("Granted permission " + p + " does 
not contain a class.");
               } else {
  -                java.security.Permission perm =  new 
UnresolvedPermission(p.getClassName(), p.getName(), p.getActions(), null);
  +                java.security.Permission perm =
  +                    new UnresolvedPermission(p.getClassName(), p.getName(), 
p.getActions(), null);
                   granted.add(perm);
               }
           }
  @@ -153,7 +155,8 @@
       private class MySM extends SecurityManager {
   
           /**
  -         * Exit is treated in a special way in order to be able to return 
the exit code towards tasks.
  +         * Exit is treated in a special way in order to be able to return 
the exit code
  +         * towards tasks.
            * An ExitException is thrown instead of a simple SecurityException 
to indicate the exit
            * code.
            * Overridden from java.lang.SecurityManager
  
  
  
  1.6       +2 -3      
ant/src/main/org/apache/tools/ant/types/RedirectorElement.java
  
  Index: RedirectorElement.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/types/RedirectorElement.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RedirectorElement.java    10 Feb 2005 22:32:20 -0000      1.5
  +++ RedirectorElement.java    14 Mar 2005 17:47:01 -0000      1.6
  @@ -20,11 +20,8 @@
   import java.util.Vector;
   import java.util.ArrayList;
   
  -import org.apache.tools.ant.Task;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.taskdefs.Redirector;
  -import org.apache.tools.ant.types.DataType;
   
   /**
    * Element representation of a <CODE>Redirector</CODE>.
  @@ -163,6 +160,8 @@
        *
        * <p>You must not set another attribute or nest elements inside
        * this element if you make it a reference.</p>
  +     * @param r the reference to use
  +     * @throws BuildException on error
        */
       public void setRefid(Reference r) throws BuildException {
           if (usingInput
  
  
  
  1.19      +12 -2     ant/src/main/org/apache/tools/ant/types/Substitution.java
  
  Index: Substitution.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/types/Substitution.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Substitution.java 9 Mar 2004 16:48:41 -0000       1.18
  +++ Substitution.java 14 Mar 2005 17:47:01 -0000      1.19
  @@ -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.
  @@ -38,10 +38,15 @@
   
       private String expression;
   
  +    /** Constructor for Substitution. */
       public Substitution() {
           this.expression = null;
       }
   
  +    /**
  +     * Set the pattern string for this regular expression substitution.
  +     * @param expression the regular expression to use
  +     */
       public void setExpression(String expression) {
           this.expression = expression;
       }
  @@ -49,6 +54,9 @@
       /***
        * Gets the pattern string for this RegularExpression in the
        * given project.
  +     * @param p the project to look for the regular expression if this 
object is
  +     *          a reference
  +     * @return the pattern string
        */
       public String getExpression(Project p) {
           if (isReference()) {
  @@ -60,7 +68,9 @@
   
       /***
        * Get the RegularExpression this reference refers to in
  -     * the given project.  Check for circular references too
  +     * the given project.  Check for circular references too.
  +     * @param p the project to look for the regular expression reference
  +     * @return the resolved reference
        */
       public Substitution getRef(Project p) {
           if (!isChecked()) {
  
  
  
  1.28      +33 -3     ant/src/main/org/apache/tools/ant/types/ZipFileSet.java
  
  Index: ZipFileSet.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/ZipFileSet.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ZipFileSet.java   9 Mar 2004 16:48:41 -0000       1.27
  +++ ZipFileSet.java   14 Mar 2005 17:47:01 -0000      1.28
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2004 The Apache Software Foundation
  + * Copyright  2001-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.
  @@ -62,14 +62,23 @@
       private boolean fileModeHasBeenSet = false;
       private boolean dirModeHasBeenSet  = false;
   
  +    /** Constructor for ZipFileSet */
       public ZipFileSet() {
           super();
       }
   
  +    /**
  +     * Constructor using a fileset arguement.
  +     * @param fileset the fileset to use
  +     */
       protected ZipFileSet(FileSet fileset) {
           super(fileset);
       }
   
  +    /**
  +     * Constructor using a zipfileset arguement.
  +     * @param fileset the zipfileset to use
  +     */
       protected ZipFileSet(ZipFileSet fileset) {
           super(fileset);
           srcFile = fileset.srcFile;
  @@ -85,6 +94,8 @@
       /**
        * Set the directory for the fileset.  Prevents both "dir" and "src"
        * from being specified.
  +     * @param dir the directory for the fileset
  +     * @throws BuildException on error
        */
       public void setDir(File dir) throws BuildException {
           if (isReference()) {
  @@ -118,6 +129,8 @@
        * Get the zip file from which entries will be extracted.
        * References are not followed, since it is not possible
        * to have a reference to a ZipFileSet, only to a FileSet.
  +     * @param p the project to use
  +     * @return the source file
        */
       public File getSrc(Project p) {
           if (isReference()) {
  @@ -141,6 +154,8 @@
   
       /**
        * Return the prefix prepended to entries in the zip file.
  +     * @param p the project to use
  +     * @return the prefix
        */
       public String getPrefix(Project p) {
           if (isReference()) {
  @@ -164,6 +179,8 @@
   
       /**
        * Return the full pathname of the single entry in this fileset.
  +     * @param p the project to use
  +     * @return the full path
        */
       public String getFullpath(Project p) {
           if (isReference()) {
  @@ -176,6 +193,8 @@
        * Return the DirectoryScanner associated with this FileSet.
        * If the ZipFileSet defines a source Zip file, then a ZipScanner
        * is returned instead.
  +     * @param p the project to use
  +     * @return a directory scanner
        */
       public DirectoryScanner getDirectoryScanner(Project p) {
           if (isReference()) {
  @@ -197,7 +216,7 @@
        * A 3 digit octal string, specify the user, group and
        * other modes in the standard Unix fashion;
        * optional, default=0644
  -     *
  +     * @param octalString a <code>String</code> value
        * @since Ant 1.5.2
        */
       public void setFileMode(String octalString) {
  @@ -207,6 +226,9 @@
       }
   
       /**
  +     * Get the mode of the zip fileset
  +     * @param p the project to use
  +     * @return the mode
        * @since Ant 1.5.2
        */
       public int getFileMode(Project p) {
  @@ -218,7 +240,7 @@
   
       /**
        * Whether the user has specified the mode explicitly.
  -     *
  +     * @return true if it has been set
        * @since Ant 1.6
        */
       public boolean hasFileModeBeenSet() {
  @@ -232,6 +254,7 @@
        * A 3 digit octal string, specify the user, group and
        * other modes in the standard Unix fashion;
        * optional, default=0755
  +     * @param octalString a <code>String</code> value
        *
        * @since Ant 1.5.2
        */
  @@ -242,6 +265,9 @@
       }
   
       /**
  +     * Get the dir mode of the zip fileset
  +     * @param p the project to use
  +     * @return the mode
        * @since Ant 1.5.2
        */
       public int getDirMode(Project p) {
  @@ -254,6 +280,7 @@
       /**
        * Whether the user has specified the mode explicitly.
        *
  +     * @return true if it has been set
        * @since Ant 1.6
        */
       public boolean hasDirModeBeenSet() {
  @@ -266,6 +293,8 @@
       /**
        * A ZipFileset accepts another ZipFileSet or a FileSet as reference
        * FileSets are often used by the war task for the lib attribute
  +     * @param p the project to use
  +     * @return the abstract fileset instance
        */
       protected AbstractFileSet getRef(Project p) {
           if (!isChecked()) {
  @@ -293,6 +322,7 @@
       /**
        * Return a ZipFileSet that has the same properties
        * as this one.
  +     * @return the cloned zipFileSet
        * @since Ant 1.6
        */
       public Object clone() {
  
  
  
  1.29      +2 -2      ant/src/main/org/apache/tools/ant/types/ZipScanner.java
  
  Index: ZipScanner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/ZipScanner.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- ZipScanner.java   21 Jan 2005 22:17:51 -0000      1.28
  +++ ZipScanner.java   14 Mar 2005 17:47:01 -0000      1.29
  @@ -72,7 +72,7 @@
   
       /**
        * Sets encoding of file names.
  -     *
  +     * @param encoding the encoding format
        * @since Ant 1.6
        */
       public void setEncoding(String encoding) {
  @@ -166,7 +166,7 @@
   
       /**
        * @param name path name of the file sought in the archive
  -     *
  +     * @return the resource
        * @since Ant 1.5.2
        */
       public Resource getResource(String name) {
  
  
  

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

Reply via email to