Printing out all fields of an object


Often when debugging the printed Object has just the hash number (like Object@h43a356).
The following static method uses reflections to print out all fields:

org.apache.commons.lang.
builder.ToStringBuilder.reflectionToString(object, ToStringStyle.MULTI_LINE_STYLE);

Comments

Popular posts from this blog

Exporting Skype Chat/Skype Contacts to csv file using the shell script and sqlite3 (usually already installed on mac)

trim() not supported by IE7 and IE8

Finally, clear explanation of TinyOS 2.x serial packet structure