commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: Hierarchies not supported in ToStringBuilder.reflectionToString(this)?
Date Wed, 11 Dec 2002 19:29:27 GMT
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
View raw message