commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject RE: Hierarchies not supported in ToStringBuilder.reflectionToStri ng(this)?
Date Thu, 26 Dec 2002 22:47:51 GMT

(1) Are you saying that superclasses should be considered for the HashCode,
Equals and CompareTo buiders?
(2) I would consider these separate issues but I would be glad to help on
these provided you give me some feedback on the proposed fix I gave for the
ToString builder in order to carry the fix in the same style (I created a
separate append method for loop details vs. all in one method).

Merry Xmas,
Joyeux Noel,

-----Original Message-----
From: Stephen Colebourne []
Sent: Wednesday, December 11, 2002 11:29 AM
To: Jakarta Commons Users List
Cc: Gary Gregory
Subject: Re: Hierarchies not supported in

From: "Gary Gregory" <>
> The first question I have towards implementing this is whether or not to
> define this as a bug or a feature request WRT backwards compatibility.
> (1) Simplest is sometimes best: This is a bug and reflectionToString()
> handle hierarchies.
> (2) More complicated to use and explain: reflectionToString() will
> configurable WRT superclasses, perhaps with a toggle in a style class.
> is quite more tricky, since the hook must be provided in the right place.

I think #1 should be OK. Superclasses were ignored in the first cut, and
really I think now that was a big bug. For more specific to strings people
have the ability to use the manual fields.

By the way, this affects the HashCode, Equals and CompareTo buiders as well


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message