From ae1fc5217150f3a04a81bd09d484b7d0566fe1cf Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Fri, 11 Mar 2005 11:02:59 +0000 Subject: [PATCH] javadoc git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277897 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/taskdefs/Copydir.java | 22 +++++++++++++++- .../apache/tools/ant/taskdefs/Copyfile.java | 25 ++++++++++++++++++- .../apache/tools/ant/taskdefs/Dirname.java | 9 ++++--- .../org/apache/tools/ant/taskdefs/Ear.java | 15 ++++++++++- .../org/apache/tools/ant/taskdefs/Echo.java | 6 ++--- 5 files changed, 68 insertions(+), 9 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Copydir.java b/src/main/org/apache/tools/ant/taskdefs/Copydir.java index b0d0dd76e..a292f08cd 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Copydir.java +++ b/src/main/org/apache/tools/ant/taskdefs/Copydir.java @@ -1,5 +1,5 @@ /* - * Copyright 2000,2002-2004 The Apache Software Foundation + * Copyright 2000,2002-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. @@ -60,18 +60,38 @@ public class Copydir extends MatchingTask { destDir = dest; } + /** + * The filtering attribute. + * Default is false. + * @param filter if true use filtering + */ public void setFiltering(boolean filter) { filtering = filter; } + /** + * The flattening attribute. + * Default is false. + * @param flatten if true use flattening + */ public void setFlatten(boolean flatten) { this.flatten = flatten; } + /** + * The forceoverwrite attribute. + * Default is false. + * @param force if true overwrite even if the destination file + * is newer that the source file + */ public void setForceoverwrite(boolean force) { forceOverwrite = force; } + /** + * Execute the task. + * @throws BuildException on error + */ public void execute() throws BuildException { log("DEPRECATED - The copydir task is deprecated. Use copy instead."); diff --git a/src/main/org/apache/tools/ant/taskdefs/Copyfile.java b/src/main/org/apache/tools/ant/taskdefs/Copyfile.java index 42f17e495..019c996bc 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Copyfile.java +++ b/src/main/org/apache/tools/ant/taskdefs/Copyfile.java @@ -1,5 +1,5 @@ /* - * Copyright 2000,2002,2004 The Apache Software Foundation + * Copyright 2000,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,22 +39,45 @@ public class Copyfile extends Task { private boolean filtering = false; private boolean forceOverwrite = false; + /** + * Set the source file. + * @param src the source file. + */ public void setSrc(File src) { srcFile = src; } + /** + * The forceoverwrite attribute. + * Default is false. + * @param force if true overwrite even if the destination file + * is newer that the source file + */ public void setForceoverwrite(boolean force) { forceOverwrite = force; } + /** + * Set the destination file. + * @param dest the destination file. + */ public void setDest(File dest) { destFile = dest; } + /** + * The filtering attribute. + * Default is false. + * @param filter if true use filtering + */ public void setFiltering(String filter) { filtering = Project.toBoolean(filter); } + /** + * Execute the task. + * @throws BuildException on error + */ public void execute() throws BuildException { log("DEPRECATED - The copyfile task is deprecated. Use copy instead."); diff --git a/src/main/org/apache/tools/ant/taskdefs/Dirname.java b/src/main/org/apache/tools/ant/taskdefs/Dirname.java index 037b593d7..ccdea8b40 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Dirname.java +++ b/src/main/org/apache/tools/ant/taskdefs/Dirname.java @@ -48,7 +48,7 @@ public class Dirname extends Task { /** * Path to take the dirname of. - * @param file + * @param file a File value */ public void setFile(File file) { this.file = file; @@ -56,14 +56,17 @@ public class Dirname extends Task { /** * The name of the property to set. - * @param property + * @param property the name of the property */ public void setProperty(String property) { this.property = property; } - // The method executing the task + /** + * Execute this task. + * @throws BuildException on error + */ public void execute() throws BuildException { if (property == null) { throw new BuildException("property attribute required", getLocation()); diff --git a/src/main/org/apache/tools/ant/taskdefs/Ear.java b/src/main/org/apache/tools/ant/taskdefs/Ear.java index 4c256db86..093f5fad0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Ear.java +++ b/src/main/org/apache/tools/ant/taskdefs/Ear.java @@ -37,7 +37,6 @@ public class Ear extends Jar { private File deploymentDescriptor; private boolean descriptorAdded; - /** * Create an Ear task. */ @@ -48,6 +47,8 @@ public class Ear extends Jar { } /** + * Set the destination file. + * @param earFile the destination file * @deprecated Use setDestFile(destfile) instead */ public void setEarfile(File earFile) { @@ -56,6 +57,7 @@ public class Ear extends Jar { /** * File to incorporate as application.xml. + * @param descr the descriptor file */ public void setAppxml(File descr) { deploymentDescriptor = descr; @@ -86,6 +88,12 @@ public class Ear extends Jar { } + /** + * Initialize the output stream. + * @param zOut the zip output stream. + * @throws IOException on I/O errors + * @throws BuildException on other errors + */ protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException { // If no webxml file is specified, it's an error. @@ -98,6 +106,11 @@ public class Ear extends Jar { /** * Overridden from Zip class to deal with application.xml + * @param file the file to add to the archive + * @param zOut the stream to write to + * @param vPath the name this entry shall have in the archive + * @param mode the Unix permissions to set. + * @throws IOException on error */ protected void zipFile(File file, ZipOutputStream zOut, String vPath, int mode) diff --git a/src/main/org/apache/tools/ant/taskdefs/Echo.java b/src/main/org/apache/tools/ant/taskdefs/Echo.java index e01b6daba..e8f608d8d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Echo.java +++ b/src/main/org/apache/tools/ant/taskdefs/Echo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2004 The Apache Software Foundation + * Copyright 2000-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. @@ -134,7 +134,7 @@ public class Echo extends Task { /** * mapping of enumerated values to log levels */ - private static int levels[] = { + private static int[] levels = { Project.MSG_ERR, Project.MSG_WARN, Project.MSG_INFO, @@ -144,7 +144,7 @@ public class Echo extends Task { /** * get the level of the echo of the current value - * @return + * @return the level */ public int getLevel() { return levels[getIndex()];