Looking for standard library or technique to get pretty-printed representation of OBJECT for Java
You could use the ReflectionToStringBuilder
from the Apache Commons Lang library.
Sample:
String dump = ReflectionToStringBuilder.toString(object);
As to your question:
m(Object o) can not be called with new Object [] arg?
Sure it can, arrays of Object
is a subtype of Object
.
For a quick and dirty solution to show the output of a Java object, you could use Jackson http://jackson.codehaus.org/ this will output the object in JSON.