org.jacoco.report.internal.xml
Class XMLCoverageWriter

java.lang.Object
  extended by org.jacoco.report.internal.xml.XMLCoverageWriter

public final class XMLCoverageWriter
extends Object

Serializes coverage data as XML fragments.


Method Summary
static XMLElement createChild(XMLElement parent, String tagname, String name)
          Creates a child element with a name attribute.
static void writeBundle(org.jacoco.core.analysis.IBundleCoverage bundle, XMLElement element)
          Writes the structure of a given bundle.
static void writeCounters(org.jacoco.core.analysis.ICoverageNode node, XMLElement parent)
          Writes all non-zero counters of the given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createChild

public static XMLElement createChild(XMLElement parent,
                                     String tagname,
                                     String name)
                              throws IOException
Creates a child element with a name attribute.

Parameters:
parent - parent element
tagname - name of the child tag
name - value of the name attribute
Returns:
child element
Throws:
IOException - if XML can't be written to the underlying output

writeBundle

public static void writeBundle(org.jacoco.core.analysis.IBundleCoverage bundle,
                               XMLElement element)
                        throws IOException
Writes the structure of a given bundle.

Parameters:
bundle - bundle coverage data
element - container element for the bundle data
Throws:
IOException - if XML can't be written to the underlying output

writeCounters

public static void writeCounters(org.jacoco.core.analysis.ICoverageNode node,
                                 XMLElement parent)
                          throws IOException
Writes all non-zero counters of the given node.

Parameters:
node - node to retrieve counters from
parent - container for the counter elements
Throws:
IOException - if XML can't be written to the underlying output


Copyright © 2009-2015 Mountainminds GmbH & Co. KG. All Rights Reserved.