com.objectwave.tools.utility
Class XMLDump

java.lang.Object
  |
  +--com.objectwave.tools.utility.XMLDump

public class XMLDump
extends java.lang.Object

Hope to generate an XML document that represents our data.


Constructor Summary
XMLDump()
           
 
Method Summary
protected  void dumpAttributes(java.util.Vector dumped, java.lang.Class c, java.lang.Object obj, java.io.BufferedWriter buf)
           
protected  void dumpClassName(java.lang.Class c, java.io.BufferedWriter buf)
           
protected  void dumpFieldName(java.lang.reflect.Field field, java.io.BufferedWriter buf)
           
protected  void dumpFieldValue(java.util.Vector dumped, java.lang.reflect.Field field, java.lang.Object obj, java.io.BufferedWriter buf)
           
 void dumpHeader(java.io.BufferedWriter buf)
           
 void dumpObject(java.lang.Object obj)
          This will dump those attributes which are public.
protected  void dumpObject(java.util.Vector dumped, java.lang.Object obj, java.io.BufferedWriter buf)
           
protected  java.lang.String getFieldDeclaration(java.lang.reflect.Field f)
           
protected  java.lang.reflect.Field[] getFields(java.lang.Class c)
           
protected  java.lang.Object getFieldValue(java.lang.reflect.Field field, java.lang.Object obj)
           
 java.io.BufferedWriter getOutputWriter()
           
 java.io.OutputStream initBuffer()
           
protected  boolean isPrimitive(java.lang.Class c)
           
protected  boolean isSpecial(java.lang.Class c)
          Special will be collections like hashtable and vectors.
static void main(java.lang.String[] args)
           
 void setOutputWriter(java.io.BufferedWriter buf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDump

public XMLDump()
Method Detail

dumpAttributes

protected void dumpAttributes(java.util.Vector dumped,
                              java.lang.Class c,
                              java.lang.Object obj,
                              java.io.BufferedWriter buf)
                       throws java.io.IOException
java.io.IOException

dumpClassName

protected void dumpClassName(java.lang.Class c,
                             java.io.BufferedWriter buf)
                      throws java.io.IOException
java.io.IOException

dumpFieldName

protected void dumpFieldName(java.lang.reflect.Field field,
                             java.io.BufferedWriter buf)
                      throws java.io.IOException
java.io.IOException

dumpFieldValue

protected void dumpFieldValue(java.util.Vector dumped,
                              java.lang.reflect.Field field,
                              java.lang.Object obj,
                              java.io.BufferedWriter buf)
                       throws java.io.IOException
java.io.IOException

dumpHeader

public void dumpHeader(java.io.BufferedWriter buf)
                throws java.io.IOException
java.io.IOException

dumpObject

public void dumpObject(java.lang.Object obj)
                throws java.io.IOException
This will dump those attributes which are public.

java.io.IOException

dumpObject

protected void dumpObject(java.util.Vector dumped,
                          java.lang.Object obj,
                          java.io.BufferedWriter buf)
                   throws java.io.IOException
java.io.IOException

getFieldDeclaration

protected java.lang.String getFieldDeclaration(java.lang.reflect.Field f)

getFields

protected java.lang.reflect.Field[] getFields(java.lang.Class c)

getFieldValue

protected java.lang.Object getFieldValue(java.lang.reflect.Field field,
                                         java.lang.Object obj)

getOutputWriter

public java.io.BufferedWriter getOutputWriter()

initBuffer

public java.io.OutputStream initBuffer()
                                throws java.io.IOException
java.io.IOException

isPrimitive

protected boolean isPrimitive(java.lang.Class c)

isSpecial

protected boolean isSpecial(java.lang.Class c)
Special will be collections like hashtable and vectors.


main

public static void main(java.lang.String[] args)

setOutputWriter

public void setOutputWriter(java.io.BufferedWriter buf)