You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by st...@apache.org on 2003/08/15 08:24:02 UTC

cvs commit: xml-axis/java/src/org/apache/axis/utils ClassUtils.java

stevel      2003/08/14 23:24:02

  Modified:    java/src/org/apache/axis/utils ClassUtils.java
  Log:
  Comment cleanup
  
  Revision  Changes    Path
  1.7       +19 -4     xml-axis/java/src/org/apache/axis/utils/ClassUtils.java
  
  Index: ClassUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/ClassUtils.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ClassUtils.java	22 Apr 2003 19:36:03 -0000	1.6
  +++ ClassUtils.java	15 Aug 2003 06:24:01 -0000	1.7
  @@ -86,7 +86,9 @@
        * @return class loader
        */
       public static ClassLoader getClassLoader(String className) {
  -        if (className == null) return null;
  +        if (className == null) {
  +            return null;
  +        }
           return (ClassLoader) classloaders.get(className);
       }
   
  @@ -115,9 +117,9 @@
       /**
        * Use this method instead of Class.forName (String className, boolean init, ClassLoader loader)
        *
  -     * @param className Class name
  +     * @param _className Class name
        * @param init initialize the class
  -     * @param loader class loader
  +     * @param _loader class loader
        * @return java class
        *
        * @throws ClassNotFoundException if the class is not found
  @@ -158,7 +160,7 @@
       /**
        * Loads the class from the context class loader and then falls back to Class.forName
        *
  -     * @param className Class name
  +     * @param _className Class name
        * @return java class
        * @throws ClassNotFoundException if the class is not found
        */
  @@ -214,6 +216,19 @@
           }
       }
   
  +    /**
  +     * Get an input stream from a named resource.
  +     * Tries
  +     * <ol>
  +     * <li>the classloader that loaded "clazz" first,
  +     * <li>the system classloader
  +     * <li>the class "clazz" itself
  +     * </ol>
  +     * @todo we do not look at the context classloader: why is that? 
  +     * @param clazz class to use in the lookups
  +     * @param resource resource string to look for
  +     * @return input stream if found, or null
  +     */
       public static InputStream getResourceAsStream(Class clazz, String resource) {
           InputStream myInputStream = null;