net.sf.clirr.event
Class XmlDiffListener

java.lang.Object
  extended bynet.sf.clirr.event.DiffListenerAdapter
      extended bynet.sf.clirr.event.FileDiffListener
          extended bynet.sf.clirr.event.XmlDiffListener
All Implemented Interfaces:
DiffListener

public final class XmlDiffListener
extends net.sf.clirr.event.FileDiffListener

A DiffListener that reports any detected difference to an XML file. That file can be used by subsequent processing steps to create nice looking reports in HTML, PDF, etc.

Author:
lkuehne

Constructor Summary
XmlDiffListener(java.lang.String outFile)
           
 
Method Summary
protected  java.io.PrintStream getOutputStream()
          Returns the output stream so subclasses can write data.
 void reportDiff(ApiDifference difference)
          Does nothing
 void start()
          Writes an XML header and toplevel tag to the xml stream.
 void stop()
          Writes a footer and closes the output stream if necessary.
protected  void writeFooter()
          Closes the toplevel tag that was opened in start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDiffListener

public XmlDiffListener(java.lang.String outFile)
                throws java.io.IOException
Method Detail

reportDiff

public void reportDiff(ApiDifference difference)
Description copied from class: DiffListenerAdapter
Does nothing

Specified by:
reportDiff in interface DiffListener
Overrides:
reportDiff in class DiffListenerAdapter
See Also:
DiffListener.reportDiff(ApiDifference)

start

public void start()
Writes an XML header and toplevel tag to the xml stream.

Specified by:
start in interface DiffListener
Overrides:
start in class DiffListenerAdapter
See Also:
DiffListener.start()

writeFooter

protected void writeFooter()
Closes the toplevel tag that was opened in start.

See Also:
DiffListener.stop()

getOutputStream

protected final java.io.PrintStream getOutputStream()
Returns the output stream so subclasses can write data.

Returns:
the output stream

stop

public final void stop()
Writes a footer and closes the output stream if necessary.

Specified by:
stop in interface DiffListener
Overrides:
stop in class DiffListenerAdapter
See Also:
FileDiffListener.writeFooter()


Copyright © 2003-2004 Lars Kühne. All Rights Reserved.