public class ObjectPrinter
extends java.lang.Object
| Constructor and Description |
|---|
ObjectPrinter() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
toString(java.lang.Object o)
Convert an object to a string using reflection to access all fields.
|
static java.lang.String |
toString(java.lang.Object o,
int depth,
boolean includeSuper)
Convert an object to a string using reflection to access all fields.
|
public static java.lang.String toString(java.lang.Object o)
0 so only the object itself will be printed.o - The object to convert to a stringtoString(Object, int, boolean)public static java.lang.String toString(java.lang.Object o,
int depth,
boolean includeSuper)
null, primitive types, arrays, Iterables and Maps.0 is the default and only the object itself will be printed.toString() method of the object will be called.o - The object to convert to a stringdepth - The maximum depth of fields to accessincludeSuper - If the fields of super classes should be included