Re: Data::Dumper for java
- From: Mark Space <markspace@xxxxxxxxxxxxxx>
- Date: Mon, 06 Apr 2009 12:30:07 -0700
horos11@xxxxxxxxx wrote:
Perl has a very nice class called Data::Dumper which recursively
prints out data structures and objects, such that if an object owns
other objects, those too are printed out in 'standardized' form (ie:
showing all public and private fields of those subobjects).
Is there an equivalent module in java?
I know you could make one using reflection; my question is *has*
someone made one, one that is tunable (ie: that can override objects'
toString() methods, shows only so many levels of output, etc. Being
able to override toString() for subobjects is very important because
Java so helpfully provides a somewhat meaningless toString() function
for Object)
I'm unfamiliar with Perl and it's libraries, so I have to ask -- what would you do with such a thing?
For debugging, my debugger shows me all I need, with out any work whatsoever on my part. I haven't looked into logging utilities but the default ones do take an object as a parameter. This might just invoke toString() however. Then there's Serialization and XMLEncoder/Decoder, which might be consdiered "stadardized" forms also.
For documentation, there's this thing called Javadoc. Try it, you might like it.
.
- Follow-Ups:
- Re: Data::Dumper for java
- From: ed . peschko
- Re: Data::Dumper for java
- References:
- Data::Dumper for java
- From: horos11
- Data::Dumper for java
- Prev by Date: Data::Dumper for java
- Next by Date: How do i install Advanced Imaging ImageIO on MAC OS X?
- Previous by thread: Data::Dumper for java
- Next by thread: Re: Data::Dumper for java
- Index(es):
Relevant Pages
|