org.pf.joi.xml
Class ObjectPrinter

java.lang.Object
  extended byorg.pf.joi.xml.ObjectPrinter

public class ObjectPrinter
extends java.lang.Object

Prints the internal state of an object as XML stream to given writers.

Version:
2.0
Author:
Manfred Duchrow

Constructor Summary
ObjectPrinter()
          Initialize the new instance with default values.
 
Method Summary
 void printBasicObject(java.lang.String name, java.lang.Object object, java.io.Writer writer)
          Prints the given object as XML stream to the specified writer whereas it will use the basic inspector rather than the "clever" inspector.
 void printObject(java.lang.Object object, java.io.Writer writer)
          Prints the given object as XML stream to the specified writer.
 void printObject(java.lang.String name, java.lang.Object object)
          Prints the given object as XML stream to stdout.
 void printObject(java.lang.String name, java.lang.Object object, java.io.Writer writer)
          Prints the given object as XML stream to the specified writer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectPrinter

public ObjectPrinter()
Initialize the new instance with default values.

Method Detail

printObject

public void printObject(java.lang.String name,
                        java.lang.Object object)
Prints the given object as XML stream to stdout.

Parameters:
name - An arbitrary name for the inspected object
object - The object to be printed

printObject

public void printObject(java.lang.Object object,
                        java.io.Writer writer)
Prints the given object as XML stream to the specified writer.

Parameters:
object - The object to be printed
writer - The destination of the XML output

printObject

public void printObject(java.lang.String name,
                        java.lang.Object object,
                        java.io.Writer writer)
Prints the given object as XML stream to the specified writer.

Parameters:
name - An arbitrary name for the inspected object
object - The object to be printed
writer - The destination of the XML output

printBasicObject

public void printBasicObject(java.lang.String name,
                             java.lang.Object object,
                             java.io.Writer writer)
Prints the given object as XML stream to the specified writer whereas it will use the basic inspector rather than the "clever" inspector.

Parameters:
name - An arbitrary name for the inspected object
object - The object to be printed
writer - The destination of the XML output