org.jacoco.report.xml
Class GroupNode

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

public class GroupNode
extends NodeWithCoverage

Wrapper for an XMLElement that contains 'groups' of coverage data. Group Nodes can represent either be Bundle or Group coverage data

Version:
$Revision: $
Author:
Brock Janiczak

Field Summary
 
Fields inherited from class org.jacoco.report.xml.XMLElement
writer
 
Constructor Summary
GroupNode(GroupNode parent, ICoverageNode node)
          Creates a new Group coverage element under an existing group element for the supplied coverage node
GroupNode(XMLReportFile file, ICoverageNode coverageNode)
          Creates a new top level Group coverage element for the supplied session coverage node
 
Method Summary
 IReportVisitor visitChild(ICoverageNode node)
          Called for every direct child.
 
Methods inherited from class org.jacoco.report.xml.NodeWithCoverage
getCounterEntities, 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

GroupNode

public GroupNode(XMLReportFile file,
                 ICoverageNode coverageNode)
          throws IOException
Creates a new top level Group coverage element for the supplied session coverage node

Parameters:
file - Root element to attach to
coverageNode - Coverage node
Throws:
IOException - IO Error creating the element

GroupNode

public GroupNode(GroupNode parent,
                 ICoverageNode node)
          throws IOException
Creates a new Group coverage element under an existing group element for the supplied coverage node

Parameters:
parent - Element to attach to
node - 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