You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2009/03/14 17:34:16 UTC

svn commit: r754484 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java

Author: bayard
Date: Sat Mar 14 16:34:16 2009
New Revision: 754484

URL: http://svn.apache.org/viewvc?rev=754484&view=rev
Log:
Removed deprecated constructors from ReflectionToStringBuilder [LANG-438]

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java?rev=754484&r1=754483&r2=754484&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java Sat Mar 14 16:34:16 2009
@@ -289,52 +289,6 @@
     }
 
     /**
-     * <p>
-     * Builds a <code>toString</code> value through reflection.
-     * </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>
-     * If the <code>outputTransients</code> is <code>true</code>, transient members will be output, otherwise they
-     * are ignored, as they are likely derived fields, and not part of the value of the Object.
-     * </p>
-     * 
-     * <p>
-     * Static fields will not be included. 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>
-     * 
-     * @deprecated Use {@link #toString(Object,ToStringStyle,boolean,boolean,Class)}
-     * 
-     * @param object
-     *            the Object to be output
-     * @param style
-     *            the style of the <code>toString</code> to create, may be <code>null</code>
-     * @param outputTransients
-     *            whether to include transient fields
-     * @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>
-     * @since 2.0
-     */
-    public static String toString(Object object, ToStringStyle style, 
-                                  boolean outputTransients, Class reflectUpToClass) 
-    {
-        return new ReflectionToStringBuilder(object, style, null, reflectUpToClass, outputTransients).toString();
-    }
-
-    /**
      * Builds a String for a toString method excluding the given field name.
      * 
      * @param object
@@ -497,29 +451,6 @@
     /**
      * Constructor.
      * 
-     * @deprecated Use {@link #ReflectionToStringBuilder(Object,ToStringStyle,StringBuffer,Class,boolean,boolean)}.
-     * 
-     * @param object
-     *            the Object to build a <code>toString</code> for
-     * @param style
-     *            the style of the <code>toString</code> to create, may be <code>null</code>
-     * @param buffer
-     *            the <code>StringBuffer</code> to populate, may be <code>null</code>
-     * @param reflectUpToClass
-     *            the superclass to reflect up to (inclusive), may be <code>null</code>
-     * @param outputTransients
-     *            whether to include transient fields
-     */
-    public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer, Class reflectUpToClass,
-            boolean outputTransients) {
-        super(object, style, buffer);
-        this.setUpToClass(reflectUpToClass);
-        this.setAppendTransients(outputTransients);
-    }
-
-    /**
-     * Constructor.
-     * 
      * @param object
      *            the Object to build a <code>toString</code> for
      * @param style