peterreilly 2005/01/28 05:42:28 Modified: src/main/org/apache/tools/ant/types Mapper.java Log: javadoc Revision Changes Path 1.31 +22 -4 ant/src/main/org/apache/tools/ant/types/Mapper.java Index: Mapper.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Mapper.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- Mapper.java 22 Nov 2004 09:23:36 -0000 1.30 +++ Mapper.java 28 Jan 2005 13:42:28 -0000 1.31 @@ -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 @@ 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 @@ /** * 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 @@ /** * Set the classpath to load the FileNameMapper through (attribute). + * @param classpath the classpath */ public void setClasspath(Path classpath) { if (isReference()) { @@ -117,6 +118,7 @@ /** * 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 @@ /** * 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 @@ /** * 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 @@ * * <p>You must not set any other attribute if you make it a * reference.</p> + * @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 @@ /** * 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 @@ /** * Gets the Class object associated with the mapper implementation. * @return <CODE>Class</CODE>. + * @throws ClassNotFoundException if the class cannot be found */ protected Class getImplementationClass() throws ClassNotFoundException { @@ -234,6 +244,7 @@ /** * 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 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 @@ "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()); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]