jbeandumer - Google Code
Small library that dumps Java object state into human readable format (similar, but not exact, to JavaFX literal). For example:
Code:
Dumper dmpr = new Dumper();
System.out.println(dmpr.dump(new Date()));
prints:
Code:
java.util.Date{
cdate : null
fastTime : 1218288272098
}
Another example:
Code:
Dumper dmpr = new Dumper();
dmpr.setRadix(16); //You could use radix up to Character.MAX_RADIX, 31 for example :-)
dmpr.setIDENT("\t");
System.out.println(dmpr.dump(new ByteArrayInputStream("123456789".getBytes())));
prints:
Code:
java.io.ByteArrayInputStream{
buf : [ // byte[9]
31h, 32h, 33h, 34h, 35h, 36h, 37h, 38h,
39h
]
count : 9h
mark : 0h
pos : 0h
}
Current status: v 1.3 seems to be production ready, at least I use in my project.