public final class ObjectDumper extends Object
ph-commons-util.)| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_INDENT_WIDTH |
static int |
DEFAULT_MAX_DEPTH |
| Constructor and Description |
|---|
ObjectDumper(StringBuilder result) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendObject(Object object)
Does a dump of the given Object, using whatever
DumpMode is providied for its
class. |
void |
appendObject(Object object,
DumpMode dumpMode)
Does a dump of the given Object using the given
DumpMode. |
static String |
dumpObject(Object object,
DumpMode dumpMode)
Convenience method to do a
DumpMode.DEEP dump of a single Object
and return the resulting String. |
int |
getIndentWidth() |
int |
getMaxDepth() |
void |
setIndentWidth(int indentWidth) |
void |
setMaxDepth(int maxDepth) |
public static final int DEFAULT_INDENT_WIDTH
public static final int DEFAULT_MAX_DEPTH
public ObjectDumper(StringBuilder result)
public static String dumpObject(Object object, DumpMode dumpMode)
DumpMode.DEEP dump of a single Object
and return the resulting String.public int getIndentWidth()
public void setIndentWidth(int indentWidth)
public int getMaxDepth()
public void setMaxDepth(int maxDepth)
public void appendObject(Object object)
DumpMode is providied for its
class. If the Object is null, then DumpMode.TO_STRING is used.public void appendObject(Object object, DumpMode dumpMode)
DumpMode.object - dumpMode - if DumpMode.DEEP then the Object is dumped deeply, if
DumpMode.TO_STRING then the Object's Object.toString() is called,
if DumpMode.IGNORE then nothing happens.Copyright © 2008–2026 The University of Edinburgh. All rights reserved.