net.sourceforge.groboutils.codecoverage.v2.report
Class XmlSourceReportGenerator

java.lang.Object
  extended bynet.sourceforge.groboutils.codecoverage.v2.report.XmlSourceReportGenerator
All Implemented Interfaces:
IXmlReportConst, IXmlSourceReportConst

public class XmlSourceReportGenerator
extends java.lang.Object
implements IXmlSourceReportConst

Generates an XML report about a Java source file, containing the source file's line-by-line source, and the coverage information on that class.

Unlike the other generators, this class must be instantiated for a particular coverage report, and will be reused to make each sub-source file.

Since:
November 26, 2003
Version:
$Date: 2004/04/15 05:48:26 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Field Summary
 
Fields inherited from interface net.sourceforge.groboutils.codecoverage.v2.report.IXmlSourceReportConst
A_INDEX, A_JAVACLASS, A_SRC, T_JAVACOVERAGE, T_LINE, T_NO_LINE, T_NO_SOURCE, T_NO_SOURCE_MARKS, T_SOURCE
 
Fields inherited from interface net.sourceforge.groboutils.codecoverage.v2.report.IXmlReportConst
A_CLASSNAME, A_CLASSSIGNATURE, A_COVERED, A_COVERED_DISP, A_MEASURE, A_METHODSIGNATURE, A_METHODSIGNATURE_REAL, A_NAME, A_PACKAGE, A_PERCENTCOVERED, A_PERCENTCOVERED_DISP, A_SOURCEFILE, A_SOURCELINE, A_TEXT, A_TOTAL, A_TOTAL_DISP, A_UNIT, A_WEIGHT, A_WEIGHTEDPERCENT, A_WEIGHTEDPERCENT_DISP, T_CLASSCOVERAGE, T_COVER, T_COVERAGEREPORT, T_MARK, T_METHODCOVERAGE, T_PACKAGE
 
Constructor Summary
XmlSourceReportGenerator(org.w3c.dom.Document coverageReport)
           
 
Method Summary
protected  org.w3c.dom.Node copyNode(org.w3c.dom.Node el, org.w3c.dom.Document doc)
           
 org.w3c.dom.Document createXML(java.lang.String srcName, java.io.File srcFile)
          Sends the generated report to out using the given module and data set.
 java.lang.String[] getSourceNames()
           
protected  void parseSourceFile(java.io.File src, org.w3c.dom.Element parent, org.w3c.dom.Document doc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSourceReportGenerator

public XmlSourceReportGenerator(org.w3c.dom.Document coverageReport)
Method Detail

getSourceNames

public java.lang.String[] getSourceNames()

createXML

public org.w3c.dom.Document createXML(java.lang.String srcName,
                                      java.io.File srcFile)
                               throws java.io.IOException
Sends the generated report to out using the given module and data set.

Returns:
the root element generated.
Throws:
java.io.IOException

parseSourceFile

protected void parseSourceFile(java.io.File src,
                               org.w3c.dom.Element parent,
                               org.w3c.dom.Document doc)
                        throws java.io.IOException
Throws:
java.io.IOException

copyNode

protected org.w3c.dom.Node copyNode(org.w3c.dom.Node el,
                                    org.w3c.dom.Document doc)


Copyright © 2001-2003 by The GroboUtils Project