Taken a look at
http://jakarta.apache.org/commons/lang/api/index.html
particularly the toStringBuilder stuff.
I use something like this in some of my unit tests to have a look at results
...
import org.apache.commons.lang.builder.*;
...
public void printObj(String msg, Object o) throws Exception {
System.out.println(objToString(msg,o));
}
public String objToString(String msg, Object o) throws Exception {
return msg + "\n" + objToString(o);
}
public String objToString(Object o) throws Exception {
return ReflectionToStringBuilder.toString(o,StandardToStringStyle.MULTI_LINE_STYLE,true);
}
....