com.intersys.objects
Interface ObjectDump.Dumper

All Known Implementing Classes:
ObjectDump.PrintStreamDumper
Enclosing interface:
ObjectDump

public static interface ObjectDump.Dumper


Method Summary
 void dump(String name, Object value, ObjectHandle object)
          This method is called to dump literal value of a field
 void handleNullObject(ObjectHandle current, String fieldName)
           
 boolean indent(Object childObject, ObjectHandle currentObject, String fieldName)
          This method is called to indicate start printing of "child" object, i.e.
 void print(Object obj)
          This method is called to print a simple object
 void println(Object obj)
          This method is called to print a simple object and and then terminate the line.
 void printReference(ObjectHandle oh, ObjectHandle current, String fieldName)
          This method is called if an object that has already been printed before is encountered.
 void undent()
          This method is called to indicate end of printing of "child" object.
 

Method Detail

dump

public void dump(String name,
                 Object value,
                 ObjectHandle object)
          throws IOException
This method is called to dump literal value of a field

Parameters:
name - Name of the field
value - Value of the field
object - Object being dumped. This is sent for information only and can be disregarded.
Throws:
IOException

indent

public boolean indent(Object childObject,
                      ObjectHandle currentObject,
                      String fieldName)
               throws IOException
This method is called to indicate start printing of "child" object, i.e. a value of a field which is an object itself.If the method returns false, then child object is not printed.

Parameters:
childObject - childObject This parameter should be used only to determine whether to print this object, there is no need to print it. If the method returns true, then the object will be sent for printing subsequently.
currentObject - Current object being dumped. This is sent for information only and can be disregarded.
fieldName - Field in current object which corresponds to child object.
Returns:
whether to recurs into printing passed object.
Throws:
IOException

undent

public void undent()
            throws IOException
This method is called to indicate end of printing of "child" object. After that fields of "parent" object will be coninued to be printed.

Throws:
IOException

print

public void print(Object obj)
           throws IOException
This method is called to print a simple object

Parameters:
obj - Value of object to be printed, in most cases just a String.
Throws:
IOException

println

public void println(Object obj)
             throws IOException
This method is called to print a simple object and and then terminate the line.

Parameters:
obj - Value of object to be printed, in most cases just a String
Throws:
IOException

printReference

public void printReference(ObjectHandle oh,
                           ObjectHandle current,
                           String fieldName)
                    throws IOException
This method is called if an object that has already been printed before is encountered.

Parameters:
oh - Object that has been encountered and has been already printed.
current - Current object being dumped. This is sent for information only and can be disregarded.
fieldName - Field in current object which corresponds to child object.
Throws:
IOException

handleNullObject

public void handleNullObject(ObjectHandle current,
                             String fieldName)
                      throws IOException
Throws:
IOException