diff --git a/src/main/org/apache/tools/ant/types/Permissions.java b/src/main/org/apache/tools/ant/types/Permissions.java
index 9c47bb10b..354cb7b18 100644
--- a/src/main/org/apache/tools/ant/types/Permissions.java
+++ b/src/main/org/apache/tools/ant/types/Permissions.java
@@ -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 @@ public class Permissions {
* 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 @@ public class Permissions {
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 @@ public class Permissions {
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
diff --git a/src/main/org/apache/tools/ant/types/RedirectorElement.java b/src/main/org/apache/tools/ant/types/RedirectorElement.java
index 1968e7eda..4544e8b7e 100755
--- a/src/main/org/apache/tools/ant/types/RedirectorElement.java
+++ b/src/main/org/apache/tools/ant/types/RedirectorElement.java
@@ -20,11 +20,8 @@ import java.io.File;
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 Redirector.
@@ -163,6 +160,8 @@ public class RedirectorElement extends DataType {
*
*
You must not set another attribute or nest elements inside * this element if you make it a reference.
+ * @param r the reference to use + * @throws BuildException on error */ public void setRefid(Reference r) throws BuildException { if (usingInput diff --git a/src/main/org/apache/tools/ant/types/Substitution.java b/src/main/org/apache/tools/ant/types/Substitution.java index 479b9f1c0..28a92eb11 100644 --- a/src/main/org/apache/tools/ant/types/Substitution.java +++ b/src/main/org/apache/tools/ant/types/Substitution.java @@ -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 @@ public class Substitution extends DataType { 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 @@ public class Substitution extends DataType { /*** * 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 @@ public class Substitution extends DataType { /*** * 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()) { diff --git a/src/main/org/apache/tools/ant/types/ZipFileSet.java b/src/main/org/apache/tools/ant/types/ZipFileSet.java index 1173c08e7..f39a7f387 100644 --- a/src/main/org/apache/tools/ant/types/ZipFileSet.java +++ b/src/main/org/apache/tools/ant/types/ZipFileSet.java @@ -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 @@ public class ZipFileSet extends FileSet { 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 @@ public class ZipFileSet extends FileSet { /** * 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 @@ public class ZipFileSet extends FileSet { * 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 @@ public class ZipFileSet extends FileSet { /** * 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 @@ public class ZipFileSet extends FileSet { /** * 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 @@ public class ZipFileSet extends FileSet { * 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 @@ public class ZipFileSet extends FileSet { * A 3 digit octal string, specify the user, group and * other modes in the standard Unix fashion; * optional, default=0644 - * + * @param octalString aString value
* @since Ant 1.5.2
*/
public void setFileMode(String octalString) {
@@ -207,6 +226,9 @@ public class ZipFileSet extends FileSet {
}
/**
+ * 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 @@ public class ZipFileSet extends FileSet {
/**
* 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 @@ public class ZipFileSet extends FileSet {
* A 3 digit octal string, specify the user, group and
* other modes in the standard Unix fashion;
* optional, default=0755
+ * @param octalString a String value
*
* @since Ant 1.5.2
*/
@@ -242,6 +265,9 @@ public class ZipFileSet extends FileSet {
}
/**
+ * 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 @@ public class ZipFileSet extends FileSet {
/**
* 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 @@ public class ZipFileSet extends FileSet {
/**
* 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 @@ public class ZipFileSet extends FileSet {
/**
* Return a ZipFileSet that has the same properties
* as this one.
+ * @return the cloned zipFileSet
* @since Ant 1.6
*/
public Object clone() {
diff --git a/src/main/org/apache/tools/ant/types/ZipScanner.java b/src/main/org/apache/tools/ant/types/ZipScanner.java
index 77e0d2dd4..5c733d684 100644
--- a/src/main/org/apache/tools/ant/types/ZipScanner.java
+++ b/src/main/org/apache/tools/ant/types/ZipScanner.java
@@ -72,7 +72,7 @@ public class ZipScanner extends DirectoryScanner {
/**
* Sets encoding of file names.
- *
+ * @param encoding the encoding format
* @since Ant 1.6
*/
public void setEncoding(String encoding) {
@@ -166,7 +166,7 @@ public class ZipScanner extends DirectoryScanner {
/**
* @param name path name of the file sought in the archive
- *
+ * @return the resource
* @since Ant 1.5.2
*/
public Resource getResource(String name) {