I came across what looks to be a handy method to dump a Java object to a string (and no, I don’t mean toString()). I guess I’m spoiled by <cfdump> in ColdFusion and have got used having a visual indicator as to what an object actually looks like when trying to debug something. I haven’t yet given this code a try so I can’t speak for how well it works, but I should have a use for it soon.
About
devnulled is a blog which caters to software development related issues with a pro-unix and open standards slant. devnulled has been featured on Slashdot, Digg, the Indeed Blog, O'Reilly Hacks, and del.icio.us/popular.
Brandon Harper, the author behind devnulled,
is a Software Engineer primarily working with Java but also dabbles in Python, ColdFusion, FreeBSD, and Linux. He's been
programming since age eight, professionally for over ten years, and has been been published in various industry publications and popular websites.
Brandon also enjoys music, photography, politics, command prompts, and things with wheels a wee bit much.
3 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Thats handy, I have often thought of writing something like that but never wanted to.
Infinite loop occurs if an object refers to itself.
Continuing the Discussion