[Patch] javadoc and variable names org.apache.tools.ant.taskdefs.optional.extension.resolvers

2004-12-10 Thread Kev Jackson
- added javadoc and normal doc where appropriate
- renamed variables from m_*
Kev
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[Patch] javadoc and variable names org.apache.tools.ant.taskdefs.optional.extension.resolvers

2004-12-10 Thread Kev Jackson
- added javadoc and normal doc where appropriate
- renamed variables from m_*
Kev
Index: AntResolver.java
===
RCS file: 
/home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java,v
retrieving revision 1.10
diff -u -r1.10 AntResolver.java
--- AntResolver.java9 Mar 2004 16:48:26 -   1.10
+++ AntResolver.java10 Dec 2004 05:46:57 -
@@ -29,63 +29,87 @@
  *
  * @version $Revision: 1.10 $ $Date: 2004/03/09 16:48:26 $
  */
-public class AntResolver
-implements ExtensionResolver {
-private File m_antfile;
-private File m_destfile;
-private String m_target;
-
-public void setAntfile(File antfile) {
-m_antfile = antfile;
+public class AntResolver implements ExtensionResolver {
+private File antfile;
+private File destfile;
+private String target;
+
+/**
+ * Sets the ant file
+ * @param antfile the ant file to set
+ */
+public void setAntfile(final File antfile) {
+this.antfile = antfile;
 }
 
-public void setDestfile(File destfile) {
-m_destfile = destfile;
+/**
+ * Sets the destination file
+ * @param destfile the destination file
+ */
+public void setDestfile(final File destfile) {
+this.destfile = destfile;
 }
 
+/**
+ * Sets the target
+ * @param target the target
+ */
 public void setTarget(final String target) {
-m_target = target;
+this.target = target;
 }
 
+/**
+ * Returns the resolved file
+ * @param extension the extension
+ * @param project the project
+ * @return the file resolved
+ * @throws BuildException if the file cannot be resolved
+ */
 public File resolve(final Extension extension,
- final Project project)
-throws BuildException {
+ final Project project) throws BuildException {
 validate();
 
 final Ant ant = (Ant) project.createTask(ant);
 ant.setInheritAll(false);
-ant.setAntfile(m_antfile.getName());
+ant.setAntfile(antfile.getName());
 
 try {
 final File dir =
-m_antfile.getParentFile().getCanonicalFile();
+antfile.getParentFile().getCanonicalFile();
 ant.setDir(dir);
 } catch (final IOException ioe) {
 throw new BuildException(ioe.getMessage(), ioe);
 }
 
-if (null != m_target) {
-ant.setTarget(m_target);
+if (null != target) {
+ant.setTarget(target);
 }
 
 ant.execute();
 
-return m_destfile;
+return destfile;
 }
-
+
+/*
+ * Validates URL
+ */
 private void validate() {
-if (null == m_antfile) {
+if (null == antfile) {
 final String message = Must specify Buildfile;
 throw new BuildException(message);
 }
 
-if (null == m_destfile) {
+if (null == destfile) {
 final String message = Must specify destination file;
 throw new BuildException(message);
 }
 }
 
+/**
+ * Returns a string representation
+ * @return the string representation
+ */
 public String toString() {
-return Ant[ + m_antfile + == + m_destfile + ];
+return Ant[ + antfile + == + destfile + ];
 }
 }
Index: LocationResolver.java
===
RCS file: 
/home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java,v
retrieving revision 1.10
diff -u -r1.10 LocationResolver.java
--- LocationResolver.java   9 Mar 2004 16:48:27 -   1.10
+++ LocationResolver.java   10 Dec 2004 05:46:57 -
@@ -27,26 +27,38 @@
  *
  * @version $Revision: 1.10 $ $Date: 2004/03/09 16:48:27 $
  */
-public class LocationResolver
-implements ExtensionResolver {
-private String m_location;
+public class LocationResolver implements ExtensionResolver {
+private String location;
 
+/**
+ * Sets the location for this resolver
+ * @param location the location
+ */
 public void setLocation(final String location) {
-m_location = location;
+this.location = location;
 }
 
+/**
+ * Returns the resolved file
+ * @param extension the extension
+ * @param project the project
+ * @return the file resolved
+ * @throws BuildException if there\'s no location set
+ */
 public File resolve(final Extension extension,
-final Project project)
-throws BuildException {
-if (null == m_location) {
+final Project project) throws BuildException {
+if (null == location) {
 final String message = No location specified for resolver;
 throw new