diff --git a/src/main/org/apache/tools/ant/types/DirSet.java b/src/main/org/apache/tools/ant/types/DirSet.java index 0b296321d..1ffe58d37 100644 --- a/src/main/org/apache/tools/ant/types/DirSet.java +++ b/src/main/org/apache/tools/ant/types/DirSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 The Apache Software Foundation + * Copyright 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. @@ -25,10 +25,17 @@ package org.apache.tools.ant.types; */ public class DirSet extends AbstractFileSet { + /** + * Constructor for DirSet. + */ public DirSet() { super(); } + /** + * Constructor for DirSet, with DirSet to shallowly clone. + * @param dirset the dirset to clone. + */ protected DirSet(DirSet dirset) { super(dirset); } @@ -36,6 +43,7 @@ public class DirSet extends AbstractFileSet { /** * Return a DirSet that has the same basedir and same patternsets * as this one. + * @return the cloned dirset. */ public Object clone() { if (isReference()) { diff --git a/src/main/org/apache/tools/ant/types/Mapper.java b/src/main/org/apache/tools/ant/types/Mapper.java index 8871aa126..abb3e9c28 100644 --- a/src/main/org/apache/tools/ant/types/Mapper.java +++ b/src/main/org/apache/tools/ant/types/Mapper.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. @@ -19,7 +19,6 @@ package org.apache.tools.ant.types; import java.util.Properties; import java.util.Stack; -import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.util.FileNameMapper; @@ -93,6 +92,7 @@ public class Mapper extends DataType implements Cloneable { /** * Set the class name of the FileNameMapper to use. + * @param classname the name of the class */ public void setClassname(String classname) { if (isReference()) { @@ -103,6 +103,7 @@ public class Mapper extends DataType implements Cloneable { /** * Set the classpath to load the FileNameMapper through (attribute). + * @param classpath the classpath */ public void setClasspath(Path classpath) { if (isReference()) { @@ -117,6 +118,7 @@ public class Mapper extends DataType implements Cloneable { /** * Set the classpath to load the FileNameMapper through (nested element). + * @return a path object to be configured */ public Path createClasspath() { if (isReference()) { @@ -131,16 +133,18 @@ public class Mapper extends DataType implements Cloneable { /** * Set the classpath to load the FileNameMapper through via * reference (attribute). + * @param ref the reference to the FileNameMapper */ - public void setClasspathRef(Reference r) { + public void setClasspathRef(Reference ref) { if (isReference()) { throw tooManyAttributes(); } - createClasspath().setRefid(r); + createClasspath().setRefid(ref); } /** * Set the argument to FileNameMapper.setFrom + * @param from the from attribute to pass to the FileNameMapper */ public void setFrom(String from) { if (isReference()) { @@ -151,6 +155,7 @@ public class Mapper extends DataType implements Cloneable { /** * Set the argument to FileNameMapper.setTo + * @param to the to attribute to pass to the FileNameMapper */ public void setTo(String to) { if (isReference()) { @@ -164,6 +169,8 @@ public class Mapper extends DataType implements Cloneable { * *
You must not set any other attribute if you make it a * reference.
+ * @param r the reference to another mapper + * @throws BuildException if other attributes are set */ public void setRefid(Reference r) throws BuildException { if (type != null || from != null || to != null) { @@ -174,6 +181,8 @@ public class Mapper extends DataType implements Cloneable { /** * Returns a fully configured FileNameMapper implementation. + * @return a FileNameMapper object to be configured + * @throws BuildException on error */ public FileNameMapper getImplementation() throws BuildException { if (isReference()) { @@ -216,6 +225,7 @@ public class Mapper extends DataType implements Cloneable { /** * Gets the Class object associated with the mapper implementation. * @returnClass
.
+ * @throws ClassNotFoundException if the class cannot be found
*/
protected Class getImplementationClass() throws ClassNotFoundException {
@@ -234,6 +244,7 @@ public class Mapper extends DataType implements Cloneable {
/**
* Performs the check for circular references and returns the
* referenced Mapper.
+ * @return the referenced Mapper
*/
protected Mapper getRef() {
if (!isChecked()) {
@@ -257,6 +268,7 @@ public class Mapper extends DataType implements Cloneable {
public static class MapperType extends EnumeratedAttribute {
private Properties implementations;
+ /** Constructor for the MapperType enumeration */
public MapperType() {
implementations = new Properties();
implementations.put("identity",
@@ -275,11 +287,17 @@ public class Mapper extends DataType implements Cloneable {
"org.apache.tools.ant.util.UnPackageNameMapper");
}
+ /**
+ * @return the filenamemapper names
+ */
public String[] getValues() {
return new String[] {"identity", "flatten", "glob",
"merge", "regexp", "package", "unpackage"};
}
+ /**
+ * @return the classname for the filenamemapper name
+ */
public String getImplementation() {
return implementations.getProperty(getValue());
}