org.jacoco.report.xml
Class ClassNode

java.lang.Object
  extended by org.jacoco.report.xml.XMLElement
      extended by org.jacoco.report.xml.NodeWithCoverage
          extended by org.jacoco.report.xml.ClassNode
All Implemented Interfaces:
IReportVisitor

public class ClassNode
extends NodeWithCoverage

Wrapper for an XMLElement that contains class coverage data

Version:
$Revision: $
Author:
Brock Janiczak

Field Summary
 
Fields inherited from class org.jacoco.report.xml.XMLElement
writer
 
Constructor Summary
ClassNode(PackageNode parent, ICoverageNode classNode)
          Creates a new Class coverage element for the supplied package and class coverage node
 
Method Summary
protected  ICoverageNode.CounterEntity[] getCounterEntities()
          Retrieves the list of counters supported by this element
 IReportVisitor visitChild(ICoverageNode node)
          Called for every direct child.
 
Methods inherited from class org.jacoco.report.xml.NodeWithCoverage
visitEnd
 
Methods inherited from class org.jacoco.report.xml.XMLElement
addChildElement, attr, beginOpenTag, close, element, text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassNode

public ClassNode(PackageNode parent,
                 ICoverageNode classNode)
          throws IOException
Creates a new Class coverage element for the supplied package and class coverage node

Parameters:
parent - Parent element that will own this class element
classNode - Class coverage node
Throws:
IOException - IO Error creating the element
Method Detail

visitChild

public IReportVisitor visitChild(ICoverageNode node)
                          throws IOException
Description copied from interface: IReportVisitor
Called for every direct child.

Parameters:
node - Node for the child in the implementation class specific to this type. The counters are may yet be populated.
Returns:
visitor instance for processing the child node
Throws:
IOException - in case of IO problems with the report writer

getCounterEntities

protected ICoverageNode.CounterEntity[] getCounterEntities()
Description copied from class: NodeWithCoverage
Retrieves the list of counters supported by this element

Overrides:
getCounterEntities in class NodeWithCoverage
Returns:
Counters supported by this element