ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: Automate toString() creation
Date Tue, 15 Jan 2002 13:45:22 GMT
> -----Original Message-----
> From: Thomas Saxtoft [mailto:TS@sondagsavisen.dk]

> JavaWorld has a very interesting articel on automating creations of
> toString-methods
> (http://www.javaworld.com/javaworld/javatips/jw-javatip99.html).
> The problem I see is that in a project classes continue changing,
> developers adding or removing fields. Doing that the 
> toString() quickly
> gets out of sync with the code it represents.
> Now to the point. Has anyone made a Ant task which takes a class and
> updates the toString based on e.g. a fileset?

I doubt very much this is 'that' necessary.
Why should toString() necessarily dump all attributes of the class in the
toString() method ? The article is a nice educational 'exercise' but that's
all to me.

The toString() method is useful for debugging but if I need debug i'm using
a debugger not System.out.println(obj.toString())...

Stephane

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message