Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 71858 invoked from network); 8 Apr 2003 22:35:46 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 8 Apr 2003 22:35:46 -0000 Received: (qmail 7433 invoked by uid 97); 8 Apr 2003 22:37:43 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 7426 invoked from network); 8 Apr 2003 22:37:42 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 8 Apr 2003 22:37:42 -0000 Received: (qmail 71389 invoked by uid 500); 8 Apr 2003 22:35:42 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 71377 invoked by uid 500); 8 Apr 2003 22:35:41 -0000 Received: (qmail 71374 invoked from network); 8 Apr 2003 22:35:41 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 8 Apr 2003 22:35:41 -0000 Received: (qmail 88414 invoked by uid 1643); 8 Apr 2003 22:35:40 -0000 Date: 8 Apr 2003 22:35:40 -0000 Message-ID: <20030408223540.88412.qmail@icarus.apache.org> From: ggregory@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/builder ToStringBuilder.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ggregory 2003/04/08 15:35:40 Modified: lang/src/java/org/apache/commons/lang/builder ToStringBuilder.java Log: Improve Javadoc (I hope!). Revision Changes Path 1.19 +10 -4 jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ToStringBuilder.java Index: ToStringBuilder.java =================================================================== RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ToStringBuilder.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ToStringBuilder.java 8 Apr 2003 20:44:10 -0000 1.18 +++ ToStringBuilder.java 8 Apr 2003 22:35:40 -0000 1.19 @@ -59,16 +59,17 @@ import java.util.Set; /** - *

ToString generation routine.

+ *

toString() generation routines.

* - *

This class enables a good toString to be built for any - * class. This class aims to simplify the process by:

+ *

This class enables a good and consistent toString() to be built for any + * class or object. This class aims to simplify the process by:

*
    *
  • allowing field names *
  • handling all types consistently *
  • handling nulls consistently *
  • outputting arrays and multi-dimensional arrays *
  • enabling the detail level to be controlled for Objects and Collections + *
  • handling class hierarchies *
* *

To use this class write code as follows: @@ -110,6 +111,11 @@ * } * * + *

You can also use the builder to debug 3rd party objects:

+ *
  + * System.out.println("An object: " + ToStringBuilder.reflectionToString(anObject));
  + * 
+ * *

The exact format of the toString is determined by * the {@link ToStringStyle} passed into the constructor.

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