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
- analyzed bundlelocator
- source locatorIOException
- if the report can't be writtenpublic 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
- name of the groupIOException
- if the report can't be writtenpublic final void visitEnd() throws IOException
IOException
- if the report can't be writtenprotected abstract void handleEnd() throws IOException
IOException
- if the report can't be writtenCopyright © 2016. All rights reserved.