You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2005/01/21 15:51:50 UTC

cvs commit: ant/src/main/org/apache/tools/ant/util ClasspathUtils.java

peterreilly    2005/01/21 06:51:50

  Modified:    src/main/org/apache/tools/ant/util ClasspathUtils.java
  Log:
  checkstyle
  
  Revision  Changes    Path
  1.14      +41 -26    ant/src/main/org/apache/tools/ant/util/ClasspathUtils.java
  
  Index: ClasspathUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/ClasspathUtils.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ClasspathUtils.java	10 Dec 2004 15:18:57 -0000	1.13
  +++ ClasspathUtils.java	21 Jan 2005 14:51:50 -0000	1.14
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2003-2004 The Apache Software Foundation
  + * Copyright  2003-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.
  @@ -76,8 +76,8 @@
        *
        * <p>Assumes the logical 'false' for the reverseLoader.</p>
        *
  -     * @param p
  -     * @param ref
  +     * @param p the project
  +     * @param ref the reference
        * @return The class loader
        */
       public static ClassLoader getClassLoaderForPath(
  @@ -121,8 +121,9 @@
        *
        * <p>Assumes the logical 'false' for the reverseLoader.</p>
        *
  -     * @param path
  -     * @param loaderId
  +     * @param p current ant project
  +     * @param path the path
  +     * @param loaderId the loader id string
        * @return The class loader
        */
       public static ClassLoader getClassLoaderForPath(
  @@ -138,8 +139,12 @@
        * <p>Sets value for 'reuseLoader' to true if the magic property
        * has been set.</p>
        *
  -     * @param path
  -     * @param loaderId
  +     * @param p the project
  +     * @param path the path
  +     * @param loaderId the loader id string
  +     * @param reverseLoader if set to true this new loader will take
  +     * precedence over it's parent (which is contra the regular
  +     * classloader behaviour)
        * @return The class loader
        */
       public static ClassLoader getClassLoaderForPath(
  @@ -156,12 +161,13 @@
        * 'ant.reuse.loader' this will try to reuse the perviously
        * created loader with that id, and of course store it there upon
        * creation.</p>
  +     * @param p             Ant Project where the handled components are living in.
        * @param path          Path object to be used as classpath for this classloader
        * @param loaderId      identification for this Loader,
        * @param reverseLoader if set to true this new loader will take
        *                      precedence over it's parent (which is contra the regular
        *                      classloader behaviour)
  -     * @param p             Ant Project where the handled components are living in.
  +     * @param reuseLoader   if true reuse the loader if it is found
        * @return              ClassLoader that uses the Path as its classpath.
        */
       public static ClassLoader getClassLoaderForPath(
  @@ -197,8 +203,11 @@
        *
        * <p>This method completely ignores the ant.reuse.loader magic
        * property and should be used with caution.</p>
  -     * @param path the classpath for this loader
  -     * @param reverseLoader
  +     * @param p             Ant Project where the handled components are living in.
  +     * @param path          the classpath for this loader
  +     * @param reverseLoader if set to true this new loader will take
  +     *                      precedence over it's parent (which is contra the regular
  +     *                      classloader behaviour)
        * @return The fresh, different, not used before class loader.
        */
       public static ClassLoader getUniqueClassLoaderForPath(
  @@ -303,7 +312,7 @@
   
           /**
            * Constructs Delegate
  -         * @param component
  +         * @param component the ProjectComponent this delegate is for.
            */
           Delegate(ProjectComponent component) {
               this.component = component;
  @@ -312,9 +321,9 @@
           /**
            * This method is a Delegate method handling the @classpath attribute.
            *
  -         * <p>This attribute can set a path to add to the classpath</p>
  +         * <p>This attribute can set a path to add to the classpath.</p>
            *
  -         * @param classpath
  +         * @param classpath the path to use for the classpath.
            */
           public void setClasspath(Path classpath) {
               if (this.classpath == null) {
  @@ -328,9 +337,9 @@
            * Delegate method handling the &lt;classpath&gt; tag.
            *
            * <p>This nested path-like structure can set a path to add to the
  -         * classpath</p>
  +         * classpath.</p>
            *
  -         * @return the created path
  +         * @return the created path.
            */
           public Path createClasspath() {
               if (this.classpath == null) {
  @@ -343,9 +352,9 @@
            * Delegate method handling the @classname attribute.
            *
            * <p>This attribute sets the full qualified class name of the class
  -         * to lad and instantiate</p>
  +         * to load and instantiate.</p>
            *
  -         * @param fcqn
  +         * @param fcqn the name of the class to load.
            */
           public void setClassname(String fcqn) {
               this.className = fcqn;
  @@ -355,9 +364,9 @@
            * Delegate method handling the @classpathref attribute.
            *
            * <p>This attribute can add a referenced path-like structure to the
  -         * classpath</p>
  +         * classpath.</p>
            *
  -         * @param r
  +         * @param r the reference to the classpath.
            */
           public void setClasspathref(Reference r) {
               this.classpathId = r.getRefId();
  @@ -371,21 +380,21 @@
            * classloader should NOT follow the classical parent-first scheme.
            * </p>
            *
  -         * <p>By default this is supposed to be false</p>
  +         * <p>By default this is supposed to be false.</p>
            *
            * <p>Caution: this behaviour is contradictory to the normal way
            * classloaders work.  Do not let your ProjectComponent use it if
  -         * you are not really sure</p>
  +         * you are not really sure.</p>
            *
  -         * @param reverseLoader
  +         * @param reverseLoader if true reverse the order of looking up a class.
            */
           public void setReverseLoader(boolean reverseLoader) {
               this.reverseLoader = reverseLoader;
           }
   
           /**
  -         * Sets the loaderRef
  -         * @param r
  +         * Sets the loaderRef.
  +         * @param r the reference to the loader.
            */
           public void setLoaderRef(Reference r) {
               this.loaderId = r.getRefId();
  @@ -393,8 +402,8 @@
   
   
           /**
  -         * Finds or creates the classloader for this
  -         * @return The class loader
  +         * Finds or creates the classloader for this object.
  +         * @return The class loader.
            */
           public ClassLoader getClassLoader() {
               ClassLoader cl;
  @@ -416,6 +425,7 @@
   
           /**
            * Computes the loaderId based on the configuration of the component.
  +         * @return a loader identifier.
            */
           public String getClassLoadId() {
               if (this.loaderId == null && this.classpathId != null) {
  @@ -438,11 +448,16 @@
   
           /**
            * The classpath.
  +         * @return the classpath.
            */
           public Path getClasspath() {
               return classpath;
           }
   
  +        /**
  +         * Get the reverseLoader setting.
  +         * @return true if looking up in reverse order.
  +         */
           public boolean isReverseLoader() {
               return reverseLoader;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org