|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.dump.Dumper
public class Dumper
Generic class for dumping objects.
Used for debugging and logging purposes.
The dump methods gather information about the object to dump using Java reflections.
By default, each data member of a class and its superclasses will be dumped. If you
want to override this behaviour, the object must implement the Dumpable interface.
The class keeps track of objects already dumped to prevent endless recursions.
| Constructor Summary | |
|---|---|
Dumper()
Do not instantiate this class! |
|
| Method Summary | |
|---|---|
void |
dump(java.lang.Object object)
Dumps an object to standard output. |
void |
dump(java.lang.Object object,
java.io.Writer writer)
Dumps an object to an output. |
void |
dump(java.lang.Object object,
java.io.Writer writer,
int indent)
Dumps an object to an output. |
void |
dump(java.lang.String title,
java.lang.Object o)
Dumps an object to standard output with a title. |
void |
dump(java.lang.String title,
java.lang.Object o,
java.io.Writer writer,
int indent)
Dumps an object to an output with a title. |
void |
dumpMembers(java.lang.Object o,
java.lang.Class cls,
java.io.Writer writer,
int indent)
Dump the members of an object. |
int |
getMaxSetSize()
Gets the maximum size of a set to be dumped. |
boolean |
getSkipNull()
Gets the flag that determines if to skip null values. |
boolean |
getSkipStatic()
Gets the flag that determines if to skip static data members. |
void |
setMaxSetSize(int maxSetSizeArg)
Sets the maximum size of a set to be dumped. |
void |
setSkipNull(boolean skipNullArg)
Sets the flag that determines if to skip null values. |
void |
setSkipStatic(boolean skipStaticArg)
Sets the flag that determines if to skip static data members. |
void |
write(java.io.Writer writer,
int indent)
Writes the indent to the output writer. |
protected void |
write(java.io.Writer writer,
java.lang.String s)
Writes a string to the output writer. |
protected void |
write(java.io.Writer writer,
java.lang.String s,
int indent)
Writes a string to the output writer. |
protected void |
writeln(java.io.Writer writer)
Writes a newline to the output writer. |
protected void |
writeln(java.io.Writer writer,
java.lang.String s)
Writes a string and a newline to the output writer. |
protected void |
writeln(java.io.Writer writer,
java.lang.String s,
int indent)
Writes a string to the output writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dumper()
| Method Detail |
|---|
public void dump(java.lang.Object object)
object - The object to dump
public void dump(java.lang.String title,
java.lang.Object o)
title - The title is prepended to the actual object dumpo - The object to dump
Each indent level will translate to a tab character.
public void dump(java.lang.Object object,
java.io.Writer writer)
dump(Object) method
on the subsequent lines, indented by 1.
object - The object to dumpwriter - Writer object to use for output generation
public void dump(java.lang.Object object,
java.io.Writer writer,
int indent)
dump(Object) method
on the subsequent lines, indented by 1.
object - The object to dumpwriter - Writer object to use for output generationindent - Indentation level (0 = no indentation)
public void dump(java.lang.String title,
java.lang.Object o,
java.io.Writer writer,
int indent)
dump(Object) method
on the subsequent lines, indented by 1.
title - The title is prepended to the actual object dumpo - The object to dumpwriter - Writer object to use for output generationindent - Indentation level (0 = no indentation)
public void dumpMembers(java.lang.Object o,
java.lang.Class cls,
java.io.Writer writer,
int indent)
o - The object to dumpcls - Class object to use for the inspection of the fields of the objectwriter - Writer object to use for output generationindent - Indentation level (0 = no indentation)
public void write(java.io.Writer writer,
int indent)
writer - Writer object to use for output generationindent - Indentation level (0 = no indentation)
protected void write(java.io.Writer writer,
java.lang.String s)
throws java.io.IOException
writer - Writer object to use for output generations - The string to write
java.io.IOException - On i/o error
protected void write(java.io.Writer writer,
java.lang.String s,
int indent)
throws java.io.IOException
writer - Writer object to use for output generations - The string to writeindent - Indentation level
java.io.IOException - On i/o error
protected void writeln(java.io.Writer writer)
throws java.io.IOException
writer - Writer object to use for output generation
java.io.IOException - On i/o error
protected void writeln(java.io.Writer writer,
java.lang.String s)
throws java.io.IOException
writer - Writer object to use for output generations - The string to write
java.io.IOException - On i/o error
protected void writeln(java.io.Writer writer,
java.lang.String s,
int indent)
throws java.io.IOException
writer - Writer object to use for output generations - The string to writeindent - Indentation level
java.io.IOException - On i/o errorpublic int getMaxSetSize()
public void setMaxSetSize(int maxSetSizeArg)
public boolean getSkipStatic()
public void setSkipStatic(boolean skipStaticArg)
public boolean getSkipNull()
public void setSkipNull(boolean skipNullArg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||