public class Dumper
extends java.lang.Object
implements java.lang.Cloneable
The level of detail can be configured dynamically.
| Modifier and Type | Field and Description |
|---|---|
protected java.io.PrintStream |
stream
stream to use for output: set by constructor
|
| Constructor and Description |
|---|
Dumper()
Instantiate a dumper that will use System.out for output.
|
Dumper(java.io.PrintStream printStream)
Instantiate a dumper that will use the specified output stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDescription(java.lang.String description)
If the specified description is non-empty, print it to the stream,
prefixed by a blank.
|
protected void |
addLine(java.lang.String indent)
Print a newline, followed by the specified indentation.
|
Dumper |
clone()
Create a deep copy of this Dumper.
|
Describer |
getDescriber()
Access the Describer used by this dumper.
|
java.lang.String |
indentIncrement()
Return the indent increment.
|
Dumper |
setDescriber(Describer newDescriber)
Replace the current Describer with the specified one.
|
Dumper |
setIndentIncrement(java.lang.String newValue)
Configure the indent increment.
|
protected final java.io.PrintStream stream
public Dumper()
public Dumper(java.io.PrintStream printStream)
printStream - the output stream (not null, alias created)public Describer getDescriber()
public java.lang.String indentIncrement()
public Dumper setDescriber(Describer newDescriber)
newDescriber - the desired Describer (not null, alias created)public Dumper setIndentIncrement(java.lang.String newValue)
newValue - (not null, default=" ")protected void addDescription(java.lang.String description)
description - (not null)protected void addLine(java.lang.String indent)
indent - (not null)public Dumper clone() throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the superclass isn't cloneable