You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by gg...@apache.org on 2003/11/03 01:21:19 UTC

cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/builder ReflectionToStringBuilder.java

ggregory    2003/11/02 16:21:19

  Modified:    lang/src/java/org/apache/commons/lang/builder
                        ReflectionToStringBuilder.java
  Log:
  Remove convenience toStringWithStatics APIs.
  
  Revision  Changes    Path
  1.14      +1 -86     jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java
  
  Index: ReflectionToStringBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ReflectionToStringBuilder.java	23 Oct 2003 22:27:45 -0000	1.13
  +++ ReflectionToStringBuilder.java	3 Nov 2003 00:21:19 -0000	1.14
  @@ -336,91 +336,6 @@
       }
   
       /**
  -     * TODO: Is this convenience API really needed?
  -     * 
  -     * <p>This method uses reflection to build a suitable
  -     * <code>toString</code> value which includes static fields.</p>
  -     *
  -     * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private
  -     * fields. This means that it will throw a security exception if run
  -     * under a security manager, if the permissions are not set up correctly.
  -     * It is also not as efficient as testing explicitly. </p>
  -     *
  -     * <p>Transient fields are not output.</p>
  -     *
  -     * <p>Superclass fields will be appended up to and including 
  -     * <code>java.lang.Object</code>.</p>
  -     *
  -     * <p>The default <code>ToStringStyle</code> is used.</p>
  -     * 
  -     * @param object  the Object to be output
  -     * @return the String result
  -     * @throws IllegalArgumentException if the Object is <code>null</code>
  -     */
  -    public static Object toStringWithStatics(Object object) {
  -        return toString(object, null, false, true, null);
  -    }
  -
  -    /**
  -     * TODO: Is this convenience API really needed?
  -     * 
  -     * <p>This method uses reflection to build a suitable
  -     * <code>toString</code> value which includes static fields.</p>
  -     *
  -     * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private
  -     * fields. This means that it will throw a security exception if run
  -     * under a security manager, if the permissions are not set up correctly.
  -     * It is also not as efficient as testing explicitly. </p>
  -     *
  -     * <p>Transient fields are not output.</p>
  -     *
  -     * <p>Superclass fields will be appended up to and including the specified superclass. 
  -     * A null superclass is treated as <code>java.lang.Object</code>.</p>
  -     *
  -     * <p>The default <code>ToStringStyle</code> is used.</p>
  -     * 
  -     * @param object  the Object to be output
  -     * @param reflectUpToClass  the superclass to reflect up to (inclusive),
  -     *  may be <code>null</code>
  -     * @return the String result
  -     * @throws IllegalArgumentException if the Object is <code>null</code>
  -     */
  -    public static Object toStringWithStatics(Object object, Class reflectUpToClass) {
  -        return toString(object, null, false, true, reflectUpToClass);
  -    }
  -
  -    /**
  -     * TODO: Is this convenience API really needed?
  -     * 
  -     * <p>This method uses reflection to build a suitable
  -     * <code>toString</code> value which includes static fields.</p>
  -     *
  -     * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private
  -     * fields. This means that it will throw a security exception if run
  -     * under a security manager, if the permissions are not set up correctly.
  -     * It is also not as efficient as testing explicitly. </p>
  -     *
  -     * <p>Transient fields are not output.</p>
  -     *
  -     * <p>Superclass fields will be appended up to and including the specified superclass. 
  -     * A null superclass is treated as <code>java.lang.Object</code>.</p>
  -     *
  -     * <p>If the style is <code>null</code>, the default
  -     * <code>ToStringStyle</code> is used.</p>
  -     * 
  -     * @param object  the Object to be output
  -     * @param style  the style of the <code>toString</code> to create,
  -     *  may be <code>null</code>
  -     * @param reflectUpToClass  the superclass to reflect up to (inclusive),
  -     *  may be <code>null</code>
  -     * @return the String result
  -     * @throws IllegalArgumentException if the Object is <code>null</code>
  -     */
  -    public static Object toStringWithStatics(Object object, ToStringStyle style, Class reflectUpToClass) {
  -        return toString(object, style, false, true, reflectUpToClass);
  -    }
  -
  -    /**
        * <p>Unregisters the given object.</p>
        *
        * <p>Used by the reflection methods to avoid infinite loops.</p>
  
  
  

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