net.sf.clirr.core
Class XmlDiffListener

java.lang.Object
  extended by net.sf.clirr.core.DiffListenerAdapter
      extended by net.sf.clirr.core.XmlDiffListener
All Implemented Interfaces:
DiffListener

public final class XmlDiffListener
extends DiffListenerAdapter

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
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
Parameters:
difference - the difference that has been detected.
See Also:
DiffListener.reportDiff(net.sf.clirr.core.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:
writeFooter()


Copyright © 2003-2008 Lars K??hne. All Rights Reserved.