mbenson 2005/01/28 10:18:37 Modified: src/main/org/apache/tools/ant Project.java Log: Javadoc Revision Changes Path 1.185 +175 -181 ant/src/main/org/apache/tools/ant/Project.java Index: Project.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v retrieving revision 1.184 retrieving revision 1.185 diff -u -r1.184 -r1.185 --- Project.java 25 Jan 2005 14:48:08 -0000 1.184 +++ Project.java 28 Jan 2005 18:18:36 -0000 1.185 @@ -59,54 +59,54 @@ */ public class Project { - /** Message priority of "error". */ + /** Message priority of "error". */ public static final int MSG_ERR = 0; - /** Message priority of "warning". */ + /** Message priority of "warning". */ public static final int MSG_WARN = 1; - /** Message priority of "information". */ + /** Message priority of "information". */ public static final int MSG_INFO = 2; - /** Message priority of "verbose". */ + /** Message priority of "verbose". */ public static final int MSG_VERBOSE = 3; - /** Message priority of "debug". */ + /** Message priority of "debug". */ public static final int MSG_DEBUG = 4; /** - * Constant for the "visiting" state, used when + * Constant for the "visiting" state, used when * traversing a DFS of target dependencies. */ private static final String VISITING = "VISITING"; /** - * Constant for the "visited" state, used when + * Constant for the "visited" state, used when * traversing a DFS of target dependencies. */ private static final String VISITED = "VISITED"; /** - * Version constant for Java 1.0 + * Version constant for Java 1.0 . * * @deprecated Use [EMAIL PROTECTED] JavaEnvUtils#JAVA_1_0} instead. */ public static final String JAVA_1_0 = JavaEnvUtils.JAVA_1_0; /** - * Version constant for Java 1.1 + * Version constant for Java 1.1 . * * @deprecated Use [EMAIL PROTECTED] JavaEnvUtils#JAVA_1_1} instead. */ public static final String JAVA_1_1 = JavaEnvUtils.JAVA_1_1; /** - * Version constant for Java 1.2 + * Version constant for Java 1.2 . * * @deprecated Use [EMAIL PROTECTED] JavaEnvUtils#JAVA_1_2} instead. */ public static final String JAVA_1_2 = JavaEnvUtils.JAVA_1_2; /** - * Version constant for Java 1.3 + * Version constant for Java 1.3 . * * @deprecated Use [EMAIL PROTECTED] JavaEnvUtils#JAVA_1_3} instead. */ public static final String JAVA_1_3 = JavaEnvUtils.JAVA_1_3; /** - * Version constant for Java 1.4 + * Version constant for Java 1.4 . * * @deprecated Use [EMAIL PROTECTED] JavaEnvUtils#JAVA_1_4} instead. */ @@ -156,7 +156,7 @@ private Vector listeners = new Vector(); /** - * The Ant core classloader - may be <code>null</code> if using + * The Ant core classloader--may be <code>null</code> if using * parent classloader. */ private ClassLoader coreLoader = null; @@ -173,22 +173,22 @@ private InputHandler inputHandler = null; /** - * The default input stream used to read any input + * The default input stream used to read any input. */ private InputStream defaultInputStream = null; /** - * Keep going flag + * Keep going flag. */ private boolean keepGoingMode = false; /** - * Flag which catches Listeners which try to use System.out or System.err + * Flag which catches Listeners which try to use System.out or System.err . */ private boolean loggingMessage = false; /** - * Sets the input handler + * Set the input handler. * * @param handler the InputHandler instance to use for gathering input. */ @@ -210,17 +210,17 @@ } /** - * Get this project's input stream + * Get this project's input stream. * * @return the InputStream instance in use by this Project instance to - * read input + * read input. */ public InputStream getDefaultInputStream() { return defaultInputStream; } /** - * Retrieves the current input handler. + * Retrieve the current input handler. * * @return the InputHandler instance currently in place for the project * instance. @@ -230,15 +230,15 @@ } /** - * Creates a new Ant project. + * Create a new Ant project. */ public Project() { inputHandler = new DefaultInputHandler(); } /** - * inits a sub project - used by taskdefs.Ant - * @param subProject the subproject to initialize + * Init a sub project--used by taskdefs.Ant . + * @param subProject the subproject to initialize. */ public void initSubProject(Project subProject) { ComponentHelper.getComponentHelper(subProject) @@ -247,12 +247,12 @@ } /** - * Initialises the project. + * Initialise the project. * * This involves setting the default task definitions and loading the * system properties. * - * @exception BuildException if the default task list cannot be loaded + * @exception BuildException if the default task list cannot be loaded. */ public void init() throws BuildException { setJavaVersionProperty(); @@ -264,11 +264,11 @@ /** * Factory method to create a class loader for loading classes from - * a given path + * a given path. * * @param path the path from which classes are to be loaded. * - * @return an appropriate classloader + * @return an appropriate classloader. */ public AntClassLoader createClassLoader(Path path) { AntClassLoader loader = new AntClassLoader2(); @@ -278,7 +278,7 @@ } /** - * Sets the core classloader for the project. If a <code>null</code> + * Set the core classloader for the project. If a <code>null</code> * classloader is specified, the parent classloader should be used. * * @param coreLoader The classloader to use for the project. @@ -289,7 +289,7 @@ } /** - * Returns the core classloader to use for this project. + * Return the core classloader to use for this project. * This may be <code>null</code>, indicating that * the parent classloader should be used. * @@ -301,7 +301,7 @@ } /** - * Adds a build listener to the list. This listener will + * Add a build listener to the list. This listener will * be notified of build events for this project. * * @param listener The listener to add to the list. @@ -316,7 +316,7 @@ } /** - * Removes a build listener from the list. This listener + * Remove a build listener from the list. This listener * will no longer be notified of build events for this project. * * @param listener The listener to remove from the list. @@ -331,7 +331,7 @@ } /** - * Returns a copy of the list of build listeners for the project. + * Return a copy of the list of build listeners for the project. * * @return a list of build listeners for the project */ @@ -340,8 +340,8 @@ } /** - * Writes a message to the log with the default log level - * of MSG_INFO + * Write a message to the log with the default log level + * of MSG_INFO . * @param message The text to log. Should not be <code>null</code>. */ @@ -350,46 +350,46 @@ } /** - * Writes a project level message to the log with the given log level. + * Write a project level message to the log with the given log level. * @param message The text to log. Should not be <code>null</code>. - * @param msgLevel The priority level to log at. + * @param msgLevel The log priority level to use. */ public void log(String message, int msgLevel) { fireMessageLogged(this, message, msgLevel); } /** - * Writes a task level message to the log with the given log level. + * Write a task level message to the log with the given log level. * @param task The task to use in the log. Must not be <code>null</code>. * @param message The text to log. Should not be <code>null</code>. - * @param msgLevel The priority level to log at. + * @param msgLevel The log priority level to use. */ public void log(Task task, String message, int msgLevel) { fireMessageLogged(task, message, msgLevel); } /** - * Writes a target level message to the log with the given log level. + * Write a target level message to the log with the given log level. * @param target The target to use in the log. * Must not be <code>null</code>. * @param message The text to log. Should not be <code>null</code>. - * @param msgLevel The priority level to log at. + * @param msgLevel The log priority level to use. */ public void log(Target target, String message, int msgLevel) { fireMessageLogged(target, message, msgLevel); } /** - * Returns the set of global filters. + * Return the set of global filters. * - * @return the set of global filters + * @return the set of global filters. */ public FilterSet getGlobalFilterSet() { return globalFilterSet; } /** - * Sets a property. Any existing property of the same name + * Set a property. Any existing property of the same name * is overwritten, unless it is a user property. * @param name The name of property to set. * Must not be <code>null</code>. @@ -402,7 +402,7 @@ } /** - * Sets a property if no value currently exists. If the property + * Set a property if no value currently exists. If the property * exists already, a message is logged and the method returns with * no other effect. * @@ -418,7 +418,7 @@ } /** - * Sets a user property, which cannot be overwritten by + * Set a user property, which cannot be overwritten by * set/unset property calls. Any previous value is overwritten. * @param name The name of property to set. * Must not be <code>null</code>. @@ -432,7 +432,7 @@ } /** - * Sets a user property, which cannot be overwritten by set/unset + * Set a user property, which cannot be overwritten by set/unset * property calls. Any previous value is overwritten. Also marks * these properties as properties that have not come from the * command line. @@ -449,7 +449,7 @@ } /** - * Sets a property unless it is already defined as a user property + * Set a property unless it is already defined as a user property * (in which case the method returns silently). * * @param name The name of the property. @@ -462,7 +462,7 @@ } /** - * Returns the value of a property, if it is set. + * Return the value of a property, if it is set. * * @param name The name of the property. * May be <code>null</code>, in which case @@ -476,7 +476,7 @@ } /** - * Replaces ${} style constructions in the given value with the + * Replace ${} style constructions in the given value with the * string value of the corresponding data types. * * @param value The string to be scanned for property references. @@ -487,7 +487,7 @@ * <code>null</code>. * * @exception BuildException if the given value has an unclosed - * property name, e.g. <code>${xxx</code> + * property name, e.g. <code>${xxx</code>. */ public String replaceProperties(String value) throws BuildException { @@ -496,7 +496,7 @@ } /** - * Returns the value of a user property, if it is set. + * Return the value of a user property, if it is set. * * @param name The name of the property. * May be <code>null</code>, in which case @@ -510,7 +510,7 @@ } /** - * Returns a copy of the properties table. + * Return a copy of the properties table. * @return a hashtable containing all properties * (including user properties). */ @@ -520,8 +520,8 @@ } /** - * Returns a copy of the user property hashtable - * @return a hashtable containing just the user properties + * Return a copy of the user property hashtable. + * @return a hashtable containing just the user properties. */ public Hashtable getUserProperties() { PropertyHelper ph = PropertyHelper.getPropertyHelper(this); @@ -529,11 +529,11 @@ } /** - * Copies all user properties that have been set on the command + * Copy all user properties that have been set on the command * line or a GUI tool from this instance to the Project instance * given as the argument. * - * <p>To copy all "user" properties, you will also have to call + * <p>To copy all "user" properties, you will also have to call * [EMAIL PROTECTED] #copyInheritedProperties copyInheritedProperties}.</p> * * @param other the project to copy the properties to. Must not be null. @@ -546,11 +546,11 @@ } /** - * Copies all user properties that have not been set on the + * Copy all user properties that have not been set on the * command line or a GUI tool from this instance to the Project * instance given as the argument. * - * <p>To copy all "user" properties, you will also have to call + * <p>To copy all "user" properties, you will also have to call * [EMAIL PROTECTED] #copyUserProperties copyUserProperties}.</p> * * @param other the project to copy the properties to. Must not be null. @@ -563,7 +563,7 @@ } /** - * Sets the default target of the project. + * Set the default target of the project. * * @param defaultTarget The name of the default target for this project. * May be <code>null</code>, indicating that there is @@ -577,7 +577,7 @@ } /** - * Returns the name of the default target of the project. + * Return the name of the default target of the project. * @return name of the default target or * <code>null</code> if no default has been set. */ @@ -586,7 +586,7 @@ } /** - * Sets the default target of the project. + * Set the default target of the project. * * @param defaultTarget The name of the default target for this project. * May be <code>null</code>, indicating that there is @@ -597,7 +597,7 @@ } /** - * Sets the name of the project, also setting the user + * Set the name of the project, also setting the user * property <code>ant.project.name</code>. * * @param name The name of the project. @@ -609,7 +609,7 @@ } /** - * Returns the project name, if one has been set. + * Return the project name, if one has been set. * * @return the project name, or <code>null</code> if it hasn't been set. */ @@ -618,7 +618,7 @@ } /** - * Sets the project description. + * Set the project description. * * @param description The description of the project. * May be <code>null</code>. @@ -628,7 +628,7 @@ } /** - * Returns the project description, if one has been set. + * Return the project description, if one has been set. * * @return the project description, or <code>null</code> if it hasn't * been set. @@ -637,12 +637,11 @@ if (description == null) { description = Description.getDescription(this); } - return description; } /** - * Adds a filter to the set of global filters. + * Add a filter to the set of global filters. * * @param token The token to filter. * Must not be <code>null</code>. @@ -657,12 +656,11 @@ if (token == null) { return; } - globalFilterSet.addFilter(new FilterSet.Filter(token, value)); } /** - * Returns a hashtable of global filters, mapping tokens to values. + * Return a hashtable of global filters, mapping tokens to values. * * @return a hashtable of global filters, mapping tokens to values * (String to String). @@ -678,26 +676,26 @@ } /** - * Sets the base directory for the project, checking that + * Set the base directory for the project, checking that * the given filename exists and is a directory. * * @param baseD The project base directory. * Must not be <code>null</code>. * - * @exception BuildException if the directory if invalid + * @exception BuildException if the directory if invalid. */ public void setBasedir(String baseD) throws BuildException { setBaseDir(new File(baseD)); } /** - * Sets the base directory for the project, checking that + * Set the base directory for the project, checking that * the given file exists and is a directory. * * @param baseDir The project base directory. * Must not be <code>null</code>. * @exception BuildException if the specified file doesn't exist or - * isn't a directory + * isn't a directory. */ public void setBaseDir(File baseDir) throws BuildException { baseDir = FILE_UTILS.normalize(baseDir.getAbsolutePath()); @@ -716,7 +714,7 @@ } /** - * Returns the base directory of the project as a file object. + * Return the base directory of the project as a file object. * * @return the project base directory, or <code>null</code> if the * base directory has not been successfully set to a valid value. @@ -733,12 +731,12 @@ } /** - * Sets "keep-going" mode. In this mode ANT will try to execute + * Set "keep-going" mode. In this mode ANT will try to execute * as many targets as possible. All targets that do not depend * on failed target(s) will be executed. If the keepGoing settor/getter * methods are used in conjunction with the <code>ant.executor.class</code> * property, they will have no effect. - * @param keepGoingMode "keep-going" mode + * @param keepGoingMode "keep-going" mode * @since Ant 1.6 */ public void setKeepGoingMode(boolean keepGoingMode) { @@ -746,10 +744,10 @@ } /** - * Returns the keep-going mode. If the keepGoing settor/getter + * Return the keep-going mode. If the keepGoing settor/getter * methods are used in conjunction with the <code>ant.executor.class</code> * property, they will have no effect. - * @return "keep-going" mode + * @return "keep-going" mode * @since Ant 1.6 */ public boolean isKeepGoingMode() { @@ -757,8 +755,8 @@ } /** - * Returns the version of Java this class is running under. - * @return the version of Java as a String, e.g. "1.1" + * Return the version of Java this class is running under. + * @return the version of Java as a String, e.g. "1.1" . * @see org.apache.tools.ant.util.JavaEnvUtils#getJavaVersion * @deprecated use org.apache.tools.ant.util.JavaEnvUtils instead */ @@ -767,12 +765,12 @@ } /** - * Sets the <code>ant.java.version</code> property and tests for + * Set the <code>ant.java.version</code> property and tests for * unsupported JVM versions. If the version is supported, * verbose log messages are generated to record the Java version * and operating system name. * - * @exception BuildException if this Java version is not supported + * @exception BuildException if this Java version is not supported. * * @see org.apache.tools.ant.util.JavaEnvUtils#getJavaVersion */ @@ -784,7 +782,6 @@ if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_0)) { throw new BuildException("Ant cannot work on Java 1.0"); } - log("Detected Java version: " + javaVersion + " in: " + System.getProperty("java.home"), MSG_VERBOSE); @@ -792,7 +789,7 @@ } /** - * Adds all system properties which aren't already defined as + * Add all system properties which aren't already defined as * user properties to the project properties. */ public void setSystemProperties() { @@ -806,7 +803,7 @@ } /** - * Adds a new task definition to the project. + * Add a new task definition to the project. * Attempting to override an existing definition with an * equivalent one (i.e. with the same classname) results in * a verbose log message. Attempting to override an existing definition @@ -832,7 +829,7 @@ } /** - * Checks whether or not a class is suitable for serving as Ant task. + * Check whether or not a class is suitable for serving as Ant task. * Ant task implementation classes must be public, concrete, and have * a no-arg constructor. * @@ -876,8 +873,8 @@ } /** - * Returns the current task definition hashtable. The returned hashtable is - * "live" and so should not be modified. + * Return the current task definition hashtable. The returned hashtable is + * "live" and so should not be modified. * * @return a map of from task name to implementing class * (String to Class). @@ -887,7 +884,7 @@ } /** - * Adds a new datatype definition. + * Add a new datatype definition. * Attempting to override an existing definition with an * equivalent one (i.e. with the same classname) results in * a verbose log message. Attempting to override an existing definition @@ -905,8 +902,8 @@ } /** - * Returns the current datatype definition hashtable. The returned - * hashtable is "live" and so should not be modified. + * Return the current datatype definition hashtable. The returned + * hashtable is "live" and so should not be modified. * * @return a map of from datatype name to implementing class * (String to Class). @@ -916,7 +913,7 @@ } /** - * Adds a <em>new</em> target to the project. + * Add a <em>new</em> target to the project. * * @param target The target to be added to the project. * Must not be <code>null</code>. @@ -930,14 +927,14 @@ } /** - * Adds a <em>new</em> target to the project. + * Add a <em>new</em> target to the project. * * @param targetName The name to use for the target. * Must not be <code>null</code>. * @param target The target to be added to the project. * Must not be <code>null</code>. * - * @exception BuildException if the target already exists in the project + * @exception BuildException if the target already exists in the project. * * @see Project#addOrReplaceTarget */ @@ -950,7 +947,7 @@ } /** - * Adds a target to the project, or replaces one with the same + * Add a target to the project, or replaces one with the same * name. * * @param target The target to be added or replaced in the project. @@ -961,7 +958,7 @@ } /** - * Adds a target to the project, or replaces one with the same + * Add a target to the project, or replaces one with the same * name. * * @param targetName The name to use for the target. @@ -977,8 +974,8 @@ } /** - * Returns the hashtable of targets. The returned hashtable - * is "live" and so should not be modified. + * Return the hashtable of targets. The returned hashtable + * is "live" and so should not be modified. * @return a map from name to target (String to Target). */ public Hashtable getTargets() { @@ -986,7 +983,7 @@ } /** - * Creates a new instance of a task, adding it to a list of + * Create a new instance of a task, adding it to a list of * created tasks for later invalidation. This causes all tasks * to be remembered until the containing project is removed * @param taskType The name of the task to create an instance of. @@ -1003,7 +1000,7 @@ } /** - * Creates a new instance of a data type. + * Create a new instance of a data type. * * @param typeName The name of the data type to create an instance of. * Must not be <code>null</code>. @@ -1025,7 +1022,7 @@ * @param targetNames A vector of target name strings to execute. * Must not be <code>null</code>. * - * @exception BuildException if the build failed + * @exception BuildException if the build failed. */ public void executeTargets(Vector targetNames) throws BuildException { @@ -1054,7 +1051,6 @@ addReference("ant.executor", o); } } - if (o == null) { throw new BuildException("Unable to obtain a Target Executor instance."); } else { @@ -1065,7 +1061,7 @@ } /** - * Demultiplexes output so that each task receives the appropriate + * Demultiplex output so that each task receives the appropriate * messages. If the current thread is not currently executing a task, * the message is logged directly. * @@ -1092,11 +1088,11 @@ * * @param buffer the buffer into which data is to be read. * @param offset the offset into the buffer at which data is stored. - * @param length the amount of data to read + * @param length the amount of data to read. * - * @return the number of bytes read + * @return the number of bytes read. * - * @exception IOException if the data cannot be read + * @exception IOException if the data cannot be read. * @since Ant 1.6 */ public int defaultInput(byte[] buffer, int offset, int length) @@ -1114,11 +1110,11 @@ * * @param buffer the buffer into which data is to be read. * @param offset the offset into the buffer at which data is stored. - * @param length the amount of data to read + * @param length the amount of data to read. * - * @return the number of bytes read + * @return the number of bytes read. * - * @exception IOException if the data cannot be read + * @exception IOException if the data cannot be read. * @since Ant 1.6 */ public int demuxInput(byte[] buffer, int offset, int length) @@ -1132,7 +1128,7 @@ } /** - * Demultiplexes flush operation so that each task receives the appropriate + * Demultiplex flush operations so that each task receives the appropriate * messages. If the current thread is not currently executing a task, * the message is logged directly. * @@ -1155,15 +1151,13 @@ } } - - /** - * Executes the specified target and any targets it depends on. + * Execute the specified target and any targets it depends on. * * @param targetName The name of the target to execute. * Must not be <code>null</code>. * - * @exception BuildException if the build failed + * @exception BuildException if the build failed. */ public void executeTarget(String targetName) throws BuildException { @@ -1183,7 +1177,7 @@ } /** - * Executes a <code>Vector</code> of sorted targets. + * Execute a <code>Vector</code> of sorted targets. * @param sortedTargets the aforementioned <code>Vector</code>. * @throws BuildException on error. */ @@ -1253,7 +1247,7 @@ } /** - * Returns the canonical form of a filename. + * Return the canonical form of a filename. * <p> * If the specified file name is relative it is resolved * with respect to the given root directory. @@ -1261,8 +1255,8 @@ * @param fileName The name of the file to resolve. * Must not be <code>null</code>. * - * @param rootDir The directory to resolve relative file names with - * respect to. May be <code>null</code>, in which case + * @param rootDir The directory respective to which relative file names + * are resolved. May be <code>null</code>, in which case * the current directory is used. * * @return the resolved File. @@ -1274,7 +1268,7 @@ } /** - * Returns the canonical form of a filename. + * Return the canonical form of a filename. * <p> * If the specified file name is relative it is resolved * with respect to the project's base directory. @@ -1290,7 +1284,7 @@ } /** - * Translates a path into its native (platform specific) format. + * Translate a path into its native (platform specific) format. * <p> * This method uses PathTokenizer to separate the input path * into its components. This handles DOS style paths in a relatively @@ -1309,7 +1303,6 @@ if (toProcess == null || toProcess.length() == 0) { return ""; } - StringBuffer path = new StringBuffer(toProcess.length() + 50); PathTokenizer tokenizer = new PathTokenizer(toProcess); while (tokenizer.hasMoreTokens()) { @@ -1321,7 +1314,6 @@ } path.append(pathComponent); } - return path.toString(); } @@ -1334,7 +1326,7 @@ * @param destFile Name of file to copy to. * Must not be <code>null</code>. * - * @exception IOException if the copying fails + * @exception IOException if the copying fails. * * @deprecated */ @@ -1354,7 +1346,7 @@ * @param filtering Whether or not token filtering should be used during * the copy. * - * @exception IOException if the copying fails + * @exception IOException if the copying fails. * * @deprecated */ @@ -1378,7 +1370,7 @@ * @param overwrite Whether or not the destination file should be * overwritten if it already exists. * - * @exception IOException if the copying fails + * @exception IOException if the copying fails. * * @deprecated */ @@ -1407,7 +1399,7 @@ * the resulting file should be set to that * of the source file. * - * @exception IOException if the copying fails + * @exception IOException if the copying fails. * * @deprecated */ @@ -1427,7 +1419,7 @@ * @param destFile File to copy to. * Must not be <code>null</code>. * - * @exception IOException if the copying fails + * @exception IOException if the copying fails. * * @deprecated */ @@ -1446,7 +1438,7 @@ * @param filtering Whether or not token filtering should be used during * the copy. * - * @exception IOException if the copying fails + * @exception IOException if the copying fails. * * @deprecated */ @@ -1511,7 +1503,7 @@ } /** - * Calls File.setLastModified(long time) on Java above 1.1, and logs + * Call File.setLastModified(long time) on Java above 1.1, and logs * a warning on Java 1.1. * * @param file The file to set the last modified time on. @@ -1532,7 +1524,7 @@ } /** - * Returns the boolean equivalent of a string, which is considered + * Return the boolean equivalent of a string, which is considered * <code>true</code> if either <code>"on"</code>, <code>"true"</code>, * or <code>"yes"</code> is found, ignoring case. * @@ -1549,7 +1541,7 @@ } /** - * Topologically sorts a set of targets. Equivalent to calling + * Topologically sort a set of targets. Equivalent to calling * <code>topoSort(new String[] {root}, targets, true)</code>. * * @param root The name of the root target. The sort is created in such @@ -1568,7 +1560,7 @@ } /** - * Topologically sorts a set of targets. Equivalent to calling + * Topologically sort a set of targets. Equivalent to calling * <code>topoSort(new String[] {root}, targets, returnAll)</code>. * * @param root The name of the root target. The sort is created in such @@ -1590,7 +1582,7 @@ } /** - * Topologically sorts a set of targets. + * Topologically sort a set of targets. * * @param root <code>String[]</code> containing the names of the root targets. * The sort is created in such a way that the ordered sequence of @@ -1653,23 +1645,24 @@ } /** - * Performs a single step in a recursive depth-first-search traversal of + * Perform a single step in a recursive depth-first-search traversal of * the target dependency tree. * <p> - * The current target is first set to the "visiting" state, and pushed - * onto the "visiting" stack. + * The current target is first set to the "visiting" state, and + * pushed onto the "visiting" stack. * <p> * An exception is then thrown if any child of the current node is in the * visiting state, as that implies a circular dependency. The exception - * contains details of the cycle, using elements of the "visiting" stack. + * contains details of the cycle, using elements of the "visiting" + * stack. * <p> - * If any child has not already been "visited", this method is called - * recursively on it. + * If any child has not already been "visited", this method is + * called recursively on it. * <p> * The current target is then added to the ordered list of targets. Note * that this is performed after the children have been visited in order - * to get the correct order. The current target is set to the "visited" - * state. + * to get the correct order. The current target is set to the + * "visited" state. * <p> * By the time this method returns, the ordered list contains the sequence * of targets up to and including the current target. @@ -1678,10 +1671,9 @@ * Must not be <code>null</code>. * @param targets A mapping from names to targets (String to Target). * Must not be <code>null</code>. - * @param state A mapping from target names to states - * (String to String). - * The states in question are "VISITING" and "VISITED". - * Must not be <code>null</code>. + * @param state A mapping from target names to states (String to String). + * The states in question are "VISITING" and + * "VISITED". Must not be <code>null</code>. * @param visiting A stack of targets which are currently being visited. * Must not be <code>null</code>. * @param ret The list to add target names to. This will end up @@ -1713,10 +1705,8 @@ sb.append(parent); sb.append("'."); } - throw new BuildException(new String(sb)); } - for (Enumeration en = target.getDependencies(); en.hasMoreElements();) { String cur = (String) en.nextElement(); String m = (String) state.get(cur); @@ -1728,7 +1718,6 @@ throw makeCircularException(cur, visiting); } } - String p = (String) visiting.pop(); if (root != p) { throw new RuntimeException("Unexpected internal error: expected to " @@ -1739,7 +1728,7 @@ } /** - * Builds an appropriate exception detailing a specified circular + * Build an appropriate exception detailing a specified circular * dependency. * * @param end The dependency to stop at. Must not be <code>null</code>. @@ -1760,7 +1749,7 @@ } /** - * Adds a reference to the project. + * Add a reference to the project. * * @param name The name of the reference. Must not be <code>null</code>. * @param value The value of the reference. Must not be <code>null</code>. @@ -1782,8 +1771,8 @@ } /** - * Returns a map of the references in the project (String to Object). - * The returned hashtable is "live" and so must not be modified. + * Return a map of the references in the project (String to Object). + * The returned hashtable is "live" and so must not be modified. * * @return a map of the references in the project (String to Object). */ @@ -1792,7 +1781,7 @@ } /** - * Looks up a reference by its key (ID). + * Look up a reference by its key (ID). * * @param key The key for the desired reference. * Must not be <code>null</code>. @@ -1805,7 +1794,7 @@ } /** - * Returns a description of the type of the given element, with + * Return a description of the type of the given element, with * special handling for instances of tasks and data types. * <p> * This is useful for logging purposes. @@ -1813,7 +1802,7 @@ * @param element The element to describe. * Must not be <code>null</code>. * - * @return a description of the element type + * @return a description of the element type. * * @since 1.95, Ant 1.5 */ @@ -1822,7 +1811,8 @@ } /** - * Sends a "build started" event to the build listeners for this project. + * Send a "build started" event + * to the build listeners for this project. */ public void fireBuildStarted() { BuildEvent event = new BuildEvent(this); @@ -1834,7 +1824,8 @@ } /** - * Sends a "build finished" event to the build listeners for this project. + * Send a "build finished" event to the build listeners + * for this project. * @param exception an exception indicating a reason for a build * failure. May be <code>null</code>, indicating * a successful build. @@ -1850,7 +1841,7 @@ } /** - * Sends a "subbuild started" event to the build listeners for + * Send a "subbuild started" event to the build listeners for * this project. * * @since Ant 1.6.2 @@ -1867,7 +1858,7 @@ } /** - * Sends a "subbuild finished" event to the build listeners for + * Send a "subbuild finished" event to the build listeners for * this project. * @param exception an exception indicating a reason for a build * failure. May be <code>null</code>, indicating @@ -1888,7 +1879,8 @@ } /** - * Sends a "target started" event to the build listeners for this project. + * Send a "target started" event to the build listeners + * for this project. * * @param target The target which is starting to build. * Must not be <code>null</code>. @@ -1903,8 +1895,8 @@ } /** - * Sends a "target finished" event to the build listeners for this - * project. + * Send a "target finished" event to the build listeners + * for this project. * * @param target The target which has finished building. * Must not be <code>null</code>. @@ -1923,7 +1915,8 @@ } /** - * Sends a "task started" event to the build listeners for this project. + * Send a "task started" event to the build listeners + * for this project. * * @param task The target which is starting to execute. * Must not be <code>null</code>. @@ -1940,7 +1933,7 @@ } /** - * Sends a "task finished" event to the build listeners for this + * Send a "task finished" event to the build listeners for this * project. * * @param task The task which has finished executing. @@ -1963,7 +1956,8 @@ } /** - * Sends a "message logged" event to the build listeners for this project. + * Send a "message logged" event to the build listeners + * for this project. * * @param event The event to send. This should be built up with the * appropriate task/target/project by the caller, so that @@ -2012,8 +2006,8 @@ } /** - * Sends a "message logged" project level event to the build listeners for - * this project. + * Send a "message logged" project level event + * to the build listeners for this project. * * @param project The project generating the event. * Should not be <code>null</code>. @@ -2027,8 +2021,8 @@ } /** - * Sends a "message logged" target level event to the build listeners for - * this project. + * Send a "message logged" target level event + * to the build listeners for this project. * * @param target The target generating the event. * Must not be <code>null</code>. @@ -2042,8 +2036,8 @@ } /** - * Sends a "message logged" task level event to the build listeners for - * this project. + * Send a "message logged" task level event + * to the build listeners for this project. * * @param task The task generating the event. * Must not be <code>null</code>. @@ -2074,7 +2068,7 @@ } /** - * Get the current task associated with a thread, if any + * Get the current task associated with a thread, if any. * * @param thread the thread for which the task is required. * @return the task which is currently registered for the given thread or @@ -2105,10 +2099,10 @@ /** Returns the unmodified original object. * This method should be called internally to - * get the 'real' object. + * get the "real" object. * The normal get method will do the replacement - * of UnknownElement ( this is similar with the JDNI - * refs behavior ) + * of UnknownElement (this is similar with the JDNI + * refs behavior). */ public Object getReal(Object key) { return super.get(key); @@ -2116,14 +2110,14 @@ /** Get method for the reference table. * It can be used to hook dynamic references and to modify - * some references on the fly - for example for delayed + * some references on the fly--for example for delayed * evaluation. * * It is important to make sure that the processing that is * done inside is not calling get indirectly. * - * @param key - * @return + * @param key lookup key. + * @return mapped value. */ public Object get(Object key) { //System.out.println("AntRefTable.get " + key); @@ -2141,8 +2135,8 @@ /** * Set a reference to this Project on the parameterized object. * Need to set the project before other set/add elements - * are called - * @param obj the object to invoke setProject(this) on + * are called. + * @param obj the object to invoke setProject(this) on. */ public final void setProjectReference(final Object obj) { if (obj instanceof ProjectComponent) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]