public abstract class AbstractGroupVisitor extends Object implements IReportGroupVisitor
Modifier and Type | Field and Description |
---|---|
protected CoverageNodeImpl |
total
coverage node for this group to total counters
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractGroupVisitor(String name)
Creates a new group with the given name.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
handleBundle(IBundleCoverage bundle,
ISourceFileLocator locator)
Called to handle the given bundle in a specific way.
|
protected abstract void |
handleEnd()
Called to handle the end of this group in a specific way.
|
protected abstract AbstractGroupVisitor |
handleGroup(String name)
Called to handle a group with the given name in a specific way.
|
void |
visitBundle(IBundleCoverage bundle,
ISourceFileLocator locator)
Called to add a bundle to the the report.
|
void |
visitEnd()
Must be called at the end of every group.
|
IReportGroupVisitor |
visitGroup(String name)
Called to add a new group to the report.
|
protected final CoverageNodeImpl total
protected AbstractGroupVisitor(String name)
name
- name for the coverage node created internallypublic final void visitBundle(IBundleCoverage bundle, ISourceFileLocator locator) throws IOException
IReportGroupVisitor
visitBundle
in interface IReportGroupVisitor
bundle
- a bundle to include in the reportlocator
- source locator for this bundleIOException
- in case of IO problems with the report writerprotected abstract void handleBundle(IBundleCoverage bundle, ISourceFileLocator locator) throws IOException
bundle
- locator
- IOException
public final IReportGroupVisitor visitGroup(String name) throws IOException
IReportGroupVisitor
IReportGroupVisitor
instance can be used to add nested bundles or
groups. The content of the group has to be completed before this or any
parent visitor can be used again ("deep first").visitGroup
in interface IReportGroupVisitor
name
- name of the groupIOException
- in case of IO problems with the report writerprotected abstract AbstractGroupVisitor handleGroup(String name) throws IOException
name
- IOException
public final void visitEnd() throws IOException
IOException
protected abstract void handleEnd() throws IOException
IOException
Copyright © 2012. All Rights Reserved.