commons-user mailing list archives

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

(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,
Gary

-----Original Message-----
From: Stephen Colebourne [mailto:scolebourne@btopenworld.com]
Sent: Wednesday, December 11, 2002 11:29 AM
To: Jakarta Commons Users List
Cc: Gary Gregory
Subject: Re: Hierarchies not supported in
ToStringBuilder.reflectionToString(this)?


From: "Gary Gregory" <ggregory@seagullsw.com>
> 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()
will
> handle hierarchies.
> (2) More complicated to use and explain: reflectionToString() will
> configurable WRT superclasses, perhaps with a toggle in a style class.
This
> 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
;-)

Stephen

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