commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang StringUtils.java ArrayUtils.java ClassUtils.java
Date Thu, 14 Nov 2002 22:29:32 GMT
scolebourne    2002/11/14 14:29:31

  Modified:    lang/src/java/org/apache/commons/lang StringUtils.java
                        ArrayUtils.java ClassUtils.java
  Log:
  Javadoc fixes, from Fredrik Westermarck
  
  Revision  Changes    Path
  1.22      +6 -7      jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java
  
  Index: StringUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- StringUtils.java	28 Oct 2002 04:33:29 -0000	1.21
  +++ StringUtils.java	14 Nov 2002 22:29:25 -0000	1.22
  @@ -1524,8 +1524,8 @@
       //--------------------------------------------------------------------------
       
       /**
  -     * Return either the passed in Object, or if it is <code>null</code>,
  -     * then an empty String.
  +     * Returns either the passed in Object as a String, or,
  +     * if the Object is <code>null</code>, an empty String.
        * 
        * @param str the Object to check
        * @return the passed in Object's toString, or blank if it was null
  @@ -1535,8 +1535,8 @@
       }
   
       /**
  -     * Return either the passed in Object, or if it is <code>null</code>,
  -     * then a passed in default String.
  +     * Returns either the passed in Object as a String, or, 
  +     * if the Object is <code>null</code>, a passed in default String.
        * 
        * @param obj the Object to check
        * @param defaultString  the default String to return if str is null
  @@ -1550,8 +1550,7 @@
       //--------------------------------------------------------------------------
   
       /**
  -     * Reverse a String, <code>null</code> String returns
  -     * <code>null</code>.
  +     * Reverse a String, <code>null</code> String returns <code>null</code>.
        * 
        * @param str the String to reverse
        * @return the reversed String
  
  
  
  1.2       +89 -81    jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java
  
  Index: ArrayUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArrayUtils.java	13 Oct 2002 22:42:06 -0000	1.1
  +++ ArrayUtils.java	14 Nov 2002 22:29:25 -0000	1.2
  @@ -101,28 +101,28 @@
       //--------------------------------------------------------------------------
       
       /**
  -     * Outputs an array as a String, treating null as an empty array.
  +     * Outputs an array as a String, treating <code>null</code> as an empty
array.
        * <p>
        * Multi-dimensional arrays are handled correctly, including 
        * multi-dimensional primitive arrays.
        * The format is that of Java source code, for example {a,b}.
        * 
  -     * @param array  the array to get a toString for, may not be null
  -     * @return a String representation of the array, '{}' if null passed in
  +     * @param array  the array to get a toString for, may not be <code>null</code>
  +     * @return a String representation of the array, '{}' if <code>null</code>
passed in
        */
       public static String toString(Object array) {
           return toString(array, "{}");
       }
       
       /**
  -     * Outputs an array as a String handling nulls.
  +     * Outputs an array as a String handling <code>null</code>s.
        * <p>
        * Multi-dimensional arrays are handled correctly, including 
        * multi-dimensional primitive arrays.
        * The format is that of Java source code, for example {a,b}.
        * 
  -     * @param array  the array to get a toString for, may be null
  -     * @param stringIfNull  the String to return if the array is null
  +     * @param array  the array to get a toString for, may be <code>null</code>
  +     * @param stringIfNull  the String to return if the array is <code>null</code>
        * @return a String representation of the array
        */    
       public static String toString(Object array, String stringIfNull) {
  @@ -149,7 +149,7 @@
        * @param array  an array whose elements are either a {@link Map.Entry} or 
        *  an Array containing at least two elements
        * @return a Map that was created from the array
  -     * @throws IllegalArgumentException  if the array is null
  +     * @throws IllegalArgumentException  if the array is <code>null</code>
        * @throws IllegalArgumentException  if one element of this Array is
        *  itself an Array containing less then two elements
        * @throws IllegalArgumentException  if the array contains elements other
  @@ -188,9 +188,9 @@
   //     * Multi-dimensional arrays are handled by the Object[] method.
   //     * The format is that of Java source code, for example {1,2}.
   //     * 
  -//     * @param array  the array to get a toString for, must not be null
  +//     * @param array  the array to get a toString for, must not be <code>null</code>
   //     * @return a String representation of the array
  -//     * @throws IllegalArgumentException if the array is null
  +//     * @throws IllegalArgumentException if the array is <code>null</code>
   //     */
   //    public static String toString(long[] array) {
   //        return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString();
  @@ -202,9 +202,9 @@
   //     * Multi-dimensional arrays are handled by the Object[] method.
   //     * The format is that of Java source code, for example {1,2}.
   //     * 
  -//     * @param array  the array to get a toString for, must not be null
  +//     * @param array  the array to get a toString for, must not be <code>null</code>
   //     * @return a String representation of the array
  -//     * @throws IllegalArgumentException if the array is null
  +//     * @throws IllegalArgumentException if the array is <code>null</code>
   //     */
   //    public static String toString(int[] array) {
   //        return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString();
  @@ -216,9 +216,9 @@
   //     * Multi-dimensional arrays are handled by the Object[] method.
   //     * The format is that of Java source code, for example {1,2}.
   //     * 
  -//     * @param array  the array to get a toString for, must not be null
  +//     * @param array  the array to get a toString for, must not be <code>null</code>
   //     * @return a String representation of the array
  -//     * @throws IllegalArgumentException if the array is null
  +//     * @throws IllegalArgumentException if the array is <code>null</code>
   //     */
   //    public static String toString(short[] array) {
   //        return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString();
  @@ -230,9 +230,9 @@
   //     * Multi-dimensional arrays are handled by the Object[] method.
   //     * The format is that of Java source code, for example {1,2}.
   //     * 
  -//     * @param array  the array to get a toString for, must not be null
  +//     * @param array  the array to get a toString for, must not be <code>null</code>
   //     * @return a String representation of the array
  -//     * @throws IllegalArgumentException if the array is null
  +//     * @throws IllegalArgumentException if the array is <code>null</code>
   //     */
   //    public static String toString(byte[] array) {
   //        return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString();
  @@ -244,9 +244,9 @@
   //     * Multi-dimensional arrays are handled by the Object[] method.
   //     * The format is that of Java source code, for example {1.0,2.0}.
   //     * 
  -//     * @param array  the array to get a toString for, must not be null
  +//     * @param array  the array to get a toString for, must not be <code>null</code>
   //     * @return a String representation of the array
  -//     * @throws IllegalArgumentException if the array is null
  +//     * @throws IllegalArgumentException if the array is <code>null</code>
   //     */
   //    public static String toString(double[] array) {
   //        return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString();
  @@ -258,9 +258,9 @@
   //     * Multi-dimensional arrays are handled by the Object[] method.
   //     * The format is that of Java source code, for example {1.0,2.0}.
   //     * 
  -//     * @param array  the array to get a toString for, must not be null
  +//     * @param array  the array to get a toString for, must not be <code>null</code>
   //     * @return a String representation of the array
  -//     * @throws IllegalArgumentException if the array is null
  +//     * @throws IllegalArgumentException if the array is <code>null</code>
   //     */
   //    public static String toString(float[] array) {
   //        return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString();
  @@ -272,9 +272,9 @@
   //     * Multi-dimensional arrays are handled by the Object[] method.
   //     * The format is that of Java source code, for example {true,false}.
   //     * 
  -//     * @param array  the array to get a toString for, must not be null
  +//     * @param array  the array to get a toString for, must not be <code>null</code>
   //     * @return a String representation of the array
  -//     * @throws IllegalArgumentException if the array is null
  +//     * @throws IllegalArgumentException if the array is <code>null</code>
   //     */
   //    public static String toString(boolean[] array) {
   //        return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString();
  @@ -283,12 +283,12 @@
       //--------------------------------------------------------------------------
   
       /**
  -     * Shallow clones an array returning a typecast result and handling null.
  +     * Shallow clones an array returning a typecast result and handling <code>null</code>.
        * <p>
        * The objecs in the array are not cloned.
        * 
  -     * @param array  the array to shallow clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to shallow clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static Object[] clone(Object[] array) {
           if (array == null) {
  @@ -298,10 +298,10 @@
       }
       
       /**
  -     * Clones an array returning a typecast result and handling null.
  +     * Clones an array returning a typecast result and handling <code>null</code>.
        * 
  -     * @param array  the array to clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static long[] clone(long[] array) {
           if (array == null) {
  @@ -311,10 +311,10 @@
       }
       
       /**
  -     * Clones an array returning a typecast result and handling null.
  +     * Clones an array returning a typecast result and handling <code>null</code>.
        * 
  -     * @param array  the array to clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static int[] clone(int[] array) {
           if (array == null) {
  @@ -324,10 +324,10 @@
       }
       
       /**
  -     * Clones an array returning a typecast result and handling null.
  +     * Clones an array returning a typecast result and handling <code>null</code>.
        * 
  -     * @param array  the array to clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static short[] clone(short[] array) {
           if (array == null) {
  @@ -337,10 +337,10 @@
       }
       
       /**
  -     * Clones an array returning a typecast result and handling null.
  +     * Clones an array returning a typecast result and handling <code>null</code>.
        * 
  -     * @param array  the array to clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static byte[] clone(byte[] array) {
           if (array == null) {
  @@ -350,10 +350,10 @@
       }
       
       /**
  -     * Clones an array returning a typecast result and handling null.
  +     * Clones an array returning a typecast result and handling <code>null</code>.
        * 
  -     * @param array  the array to clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static double[] clone(double[] array) {
           if (array == null) {
  @@ -363,10 +363,10 @@
       }
       
       /**
  -     * Clones an array returning a typecast result and handling null.
  +     * Clones an array returning a typecast result and handling <code>null</code>.
        * 
  -     * @param array  the array to clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static float[] clone(float[] array) {
           if (array == null) {
  @@ -376,10 +376,10 @@
       }
       
       /**
  -     * Clones an array returning a typecast result and handling null.
  +     * Clones an array returning a typecast result and handling <code>null</code>.
        * 
  -     * @param array  the array to clone, may not be null
  -     * @return the cloned array, or null if null passed in
  +     * @param array  the array to clone, may not be <code>null</code>
  +     * @return the cloned array, or <code>null</code> if <code>null</code>
passed in
        */
       public static boolean[] clone(boolean[] array) {
           if (array == null) {
  @@ -391,12 +391,13 @@
       //--------------------------------------------------------------------------
   
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(Object[] array1, Object[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -408,12 +409,13 @@
       }
       
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(long[] array1, long[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -425,12 +427,13 @@
       }
       
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(int[] array1, int[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -442,12 +445,13 @@
       }
       
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(short[] array1, short[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -459,12 +463,13 @@
       }
       
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(byte[] array1, byte[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -476,12 +481,13 @@
       }
       
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(double[] array1, double[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -493,12 +499,13 @@
       }
       
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(float[] array1, float[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -510,12 +517,13 @@
       }
       
       /**
  -     * Checks whether two arrays are the same length, treating null arrays as length 0.
  +     * Checks whether two arrays are the same length, treating <code>null</code>

  +     * arrays as length 0.
        * Any multi-dimensional aspects of the arrays are ignored.
        * 
  -     * @param array1 the first array, may be null
  -     * @param array2 the second array, may be null
  -     * @param true if length of arrays matches, treating null as an empty array
  +     * @param array1 the first array, may be <code>null</code>
  +     * @param array2 the second array, may be <code>null</code>
  +     * @param true if length of arrays matches, treating <code>null</code>
as an empty array
        */    
       public static boolean isSameLength(boolean[] array1, boolean[] array2) {
           if ((array1 == null && array2 != null && array2.length > 0)
||
  @@ -530,10 +538,10 @@
        * Checks whether two arrays are the same type taking into account
        * multi-dimensional arrays.
        * 
  -     * @param array1 the first array, must not be null
  -     * @param array2 the second array, must not be null
  +     * @param array1 the first array, must not be <code>null</code>
  +     * @param array2 the second array, must not be <code>null</code>
        * @param true if type of arrays matches
  -     * @throws IllegalArgumentException if either array is null
  +     * @throws IllegalArgumentException if either array is <code>null</code>
        */    
       public static boolean isSameType(Object array1, Object array2) {
           if (array1 == null || array2 == null) {
  
  
  
  1.4       +83 -86    jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java
  
  Index: ClassUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassUtils.java	24 Oct 2002 23:12:54 -0000	1.3
  +++ ClassUtils.java	14 Nov 2002 22:29:25 -0000	1.4
  @@ -56,7 +56,6 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  -import java.util.ListIterator;
   /**
    * <code>ClassUtils</code> contains utility methods for working for
    * classes without using reflection.
  @@ -80,9 +79,9 @@
       /**
        * Gets the class name minus the package name from a Class.
        * 
  -     * @param cls  the class to get the short name for, must not be null
  +     * @param cls  the class to get the short name for, must not be <code>null</code>
        * @return the class name without the package name
  -     * @throws IllegalArgumentException if the class is null
  +     * @throws IllegalArgumentException if the class is <code>null</code>
        */
       public static String getShortClassName(Class cls) {
           if (cls == null) {
  @@ -94,9 +93,9 @@
       /**
        * Gets the class name minus the package name for an Object.
        * 
  -     * @param object  the class to get the short name for, must not be null
  +     * @param object  the class to get the short name for, must not be <code>null</code>
        * @return the class name of the object without the package name
  -     * @throws IllegalArgumentException if the object is null
  +     * @throws IllegalArgumentException if the object is <code>null</code>
        */
       public static String getShortClassName(Object object) {
           if (object == null) {
  @@ -108,8 +107,7 @@
       /**
        * Gets the class name minus the package name from a String.
        * <p>
  -     * The string passed in is assumed to be a class name - it is not
  -     * checked.
  +     * The string passed in is assumed to be a class name - it is not checked.
        * 
        * @param className  the className to get the short name for, must not be empty
        * @return the class name of the class without the package name
  @@ -136,9 +134,9 @@
       /**
        * Gets the package name of a Class.
        * 
  -     * @param cls  the class to get the package name for, must not be null
  +     * @param cls  the class to get the package name for, must not be <code>null</code>
        * @return the package name
  -     * @throws IllegalArgumentException if the class is null
  +     * @throws IllegalArgumentException if the class is <code>null</code>
        */
       public static String getPackageName(Class cls) {
           if (cls == null) {
  @@ -150,9 +148,9 @@
       /**
        * Gets the package name of an Object.
        * 
  -     * @param object  the class to get the package name for, must not be null
  +     * @param object  the class to get the package name for, must not be <code>null</code>
        * @return the package name
  -     * @throws IllegalArgumentException if the object is null
  +     * @throws IllegalArgumentException if the object is <code>null</code>
        */
       public static String getPackageName(Object object) {
           if (object == null) {
  @@ -164,8 +162,7 @@
       /**
        * Gets the package name from a String.
        * <p>
  -     * The string passed in is assumed to be a class name - it is not
  -     * checked.
  +     * The string passed in is assumed to be a class name - it is not checked.
        * 
        * @param className  the className to get the package name for, must not be empty
        * @return the package name
  @@ -187,9 +184,9 @@
       /**
        * Gets a list of superclasses for the given class.
        * 
  -     * @param cls  the class to look up, must not be null
  +     * @param cls  the class to look up, must not be <code>null</code>
        * @return the list of superclasses in order going up from this one
  -     * @throws IllegalArgumentException if the class is null
  +     * @throws IllegalArgumentException if the class is <code>null</code>
        */
       public static List getAllSuperclasses(Class cls) {
           if (cls == null) {
  @@ -211,9 +208,9 @@
        * declared in the source file and following its hieracrchy up. Later
        * duplicates are ignored, so the order is maintained.
        * 
  -     * @param cls  the class to look up, must not be null
  +     * @param cls  the class to look up, must not be <code>null</code>
        * @return the list of interfaces in order
  -     * @throws IllegalArgumentException if the class is null
  +     * @throws IllegalArgumentException if the class is <code>null</code>
        */
       public static List getAllInterfaces(Class cls) {
           if (cls == null) {
  @@ -236,69 +233,69 @@
           return list;
       }
       
  -    /**
  -     * Gets a list of subclasses of the specified class.
  -     * <p>
  -     * This method searches the classpath to find all the subclasses
  -     * of a particular class available. No classes are loaded, the 
  -     * returned list contains class names, not classes.
  -     *
  -     * @param cls  the class to find subclasses for
  -     * @return the list of subclass String class names
  -     * @throws IllegalArgumentException if the class is null
  -     */
  -    public static List getAllSubclassNames(Class cls) {
  -        if (cls == null) {
  -            throw new IllegalArgumentException("The class must not be null");
  -        }
  -        // TODO Use JavaWorld tip for searching the classpath
  -        return null;
  -    }
  +//    /**
  +//     * Gets a list of subclasses of the specified class.
  +//     * <p>
  +//     * This method searches the classpath to find all the subclasses
  +//     * of a particular class available. No classes are loaded, the 
  +//     * returned list contains class names, not classes.
  +//     *
  +//     * @param cls  the class to find subclasses for
  +//     * @return the list of subclass String class names
  +//     * @throws IllegalArgumentException if the class is <code>null</code>
  +//     */
  +//    public static List getAllSubclassNames(Class cls) {
  +//        if (cls == null) {
  +//            throw new IllegalArgumentException("The class must not be null");
  +//        }
  +//        // TODO Use JavaWorld tip for searching the classpath
  +//        return null;
  +//    }
   
  -    /**
  -     * Gets a list of subclasses of the specified class.
  -     * <p>
  -     * This method searches the classpath to find all the subclasses
  -     * of a particular class available.
  -     *
  -     * @param cls  the class to find subclasses for
  -     * @return the list of subclasses
  -     * @throws IllegalArgumentException if the class is null
  -     */
  -    public static List getAllSubclasses(Class cls) {
  -        List names = getAllSubclassNames(cls);
  -        return convertClassNamesToClasses(names);
  -    }
  +//    /**
  +//     * Gets a list of subclasses of the specified class.
  +//     * <p>
  +//     * This method searches the classpath to find all the subclasses
  +//     * of a particular class available.
  +//     *
  +//     * @param cls  the class to find subclasses for
  +//     * @return the list of subclasses
  +//     * @throws IllegalArgumentException if the class is <code>null</code>
  +//     */
  +//    public static List getAllSubclasses(Class cls) {
  +//        List names = getAllSubclassNames(cls);
  +//        return convertClassNamesToClasses(names);
  +//    }
   
  -    /**
  -     * Gets a list of implementations of the specified interface.
  -     * <p>
  -     * This method searches the classpath to find all the implementations
  -     * of a particular interface available. No classes are loaded, the 
  -     * returned list contains class names, not classes.
  -     *
  -     * @param cls  the class to find sub classes for
  -     * @return the list of implementation String class names
  -     * @throws IllegalArgumentException if the class is null
  -     */
  -    public static List getAllImplementationClassNames(Class cls) {
  -        if (cls == null) {
  -            throw new IllegalArgumentException("The class must not be null");
  -        }
  -        // TODO Use JavaWorld tip for searching the classpath
  -        return null;
  -    }
  +//    /**
  +//     * Gets a list of implementations of the specified interface.
  +//     * <p>
  +//     * This method searches the classpath to find all the implementations
  +//     * of a particular interface available. No classes are loaded, the 
  +//     * returned list contains class names, not classes.
  +//     *
  +//     * @param cls  the class to find sub classes for
  +//     * @return the list of implementation String class names
  +//     * @throws IllegalArgumentException if the class is <code>null</code>
  +//     */
  +//    public static List getAllImplementationClassNames(Class cls) {
  +//        if (cls == null) {
  +//            throw new IllegalArgumentException("The class must not be null");
  +//        }
  +//        // TODO Use JavaWorld tip for searching the classpath
  +//        return null;
  +//    }
   
       /**
        * Given a list of class names, this method converts them into classes.
  -     * A new list is returned. If the class name cannot be found, null is
  -     * stored in the list. If the class name in the list is null, null is 
  -     * stored in the output list.
  +     * A new list is returned. If the class name cannot be found, <code>null</code>
  +     * is stored in the list. If the class name in the list is <code>null</code>,
  +     * <code>null</code> is stored in the output list.
        * 
  -     * @param classes  the classNames to change, the class is stored back
  -     *  into the list. null will be stored in the list if no class is found.
  +     * @param classNames  the classNames to change, the class is stored back
  +     *  into the list. <code>null</code> will be stored in the list if no class
is found.
        * @return the list of Class objects corresponding to the class names
  -     * @throws IllegalArgumentException if the classNames is null
  +     * @throws IllegalArgumentException if the classNames is <code>null</code>
        */
       public static List convertClassNamesToClasses(List classNames) {
           if (classNames == null) {
  @@ -323,7 +320,7 @@
        * @param classes  the classes to check
        * @param superclass  the superclass to check for
        * @return the list of subclasses or implementations
  -     * @throws IllegalArgumentException if the classes or superClass is null
  +     * @throws IllegalArgumentException if the classes or superClass is <code>null</code>
        */
       public static List getAssignableFrom(List classes, Class superclass) {
           if (classes == null) {
  @@ -353,13 +350,13 @@
        * reflection invocation.
        * <p>
        * Unlike the Class.isAssignableFrom method, this method takes into 
  -     * account widenings of primitive classes and nulls.
  +     * account widenings of primitive classes and <code>null</code>s.
        * <p>
        * Primitive widenings allow an int to be assigned to a long, float or 
        * double. This method returns the correct result for these cases.
        * <p>
  -     * Null may be assigned to any reference type. This method will return
  -     * true if null is passed in and the toClass is non-primitive.
  +     * <code>Null</code> may be assigned to any reference type. This method
will return
  +     * true if <code>null</code> is passed in and the toClass is non-primitive.
        * <p>
        * Specifically, this method tests whether the type represented by the
        * specified <code>Class</code> parameter can be converted to the type
  @@ -368,8 +365,8 @@
        * <em>The Java Language Specification</em>, sections 5.1.1, 5.1.2 and

        * 5.1.4 for details.
        *
  -     * @param classArray  the array of Classes to check, may be null
  -     * @param toClassArray  the array of Classes to try to assign into, may be null
  +     * @param classArray  the array of Classes to check, may be <code>null</code>
  +     * @param toClassArray  the array of Classes to try to assign into, may be <code>null</code>
        * @return true if assignment possible
        */
       public static boolean isAssignable(Class[] classArray, Class[] toClassArray) {
  @@ -394,13 +391,13 @@
        * Checks if one Class can be assigned to a variable of another Class.
        * <p>
        * Unlike the Class.isAssignableFrom method, this method takes into 
  -     * account widenings of primitive classes and nulls.
  +     * account widenings of primitive classes and <code>null</code>s.
        * <p>
        * Primitive widenings allow an int to be assigned to a long, float or 
        * double. This method returns the correct result for these cases.
        * <p>
        * Null may be assigned to any reference type. This method will return
  -     * true if null is passed in and the toClass is non-primitive.
  +     * true if <code>null</code> is passed in and the toClass is non-primitive.
        * <p>
        * Specifically, this method tests whether the type represented by the
        * specified <code>Class</code> parameter can be converted to the type
  @@ -409,10 +406,10 @@
        * <em>The Java Language Specification</em>, sections 5.1.1, 5.1.2 and

        * 5.1.4 for details.
        *
  -     * @param cls  the Class to check, may be null
  -     * @param toClass  the Class to try to assign into, must not be null
  +     * @param cls  the Class to check, may be <code>null</code>
  +     * @param toClass  the Class to try to assign into, must not be <code>null</code>
        * @return true if assignment possible
  -     * @throws IllegalArgumentException if the toClass is null
  +     * @throws IllegalArgumentException if the toClass is <code>null</code>
        */
       public static boolean isAssignable(Class cls, Class toClass) {
           if (toClass == null) {
  @@ -477,7 +474,7 @@
        * 
        * @param cls  the class to check
        * @return true if the class is an inner or static nested class
  -     * @throws IllegalArgumentException if the class is null
  +     * @throws IllegalArgumentException if the class is <code>null</code>
        */
       public static boolean isInnerClass(Class cls) {
           if (cls == null) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message