ant-user mailing list archives

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

> JavaWorld has a very interesting articel on automating creations of
> toString-methods
> (
> 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())...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message