org.jacoco.core.analysis
Interface ICoverageNode

All Known Implementing Classes:
BundleCoverage, ClassCoverage, CoverageNodeImpl, MethodCoverage, PackageCoverage, SourceFileCoverage

public interface ICoverageNode

Interface for hierarchical coverage data nodes with different coverage counters.

Version:
0.4.1.20101007204400
Author:
Marc R. Hoffmann

Nested Class Summary
static class ICoverageNode.CounterEntity
          Parameter type for generic counter access.
static class ICoverageNode.ElementType
          Type of a Java element represented by a ICoverageNode instance.
 
Method Summary
 ICounter getBlockCounter()
          Returns the counter for blocks.
 ICounter getClassCounter()
          Returns the counter for classes.
 ICounter getCounter(ICoverageNode.CounterEntity entity)
          Generic access to the the counters.
 ICoverageNode.ElementType getElementType()
          Returns the type of element represented by this node.
 ICounter getInstructionCounter()
          Returns the counter for byte code instructions.
 ICounter getLineCounter()
          Returns the counter for lines.
 ILines getLines()
          Returns the line coverage information if this node represents a source file or a part of a source file.
 ICounter getMethodCounter()
          Returns the counter for methods.
 String getName()
          Returns the name of this node.
 ICoverageNode getPlainCopy()
          Creates a plain copy of this node.
 

Method Detail

getElementType

ICoverageNode.ElementType getElementType()
Returns the type of element represented by this node.

Returns:
type of this node

getName

String getName()
Returns the name of this node.

Returns:
name of this node

getInstructionCounter

ICounter getInstructionCounter()
Returns the counter for byte code instructions.

Returns:
counter for instructions

getBlockCounter

ICounter getBlockCounter()
Returns the counter for blocks.

Returns:
counter for blocks

getLineCounter

ICounter getLineCounter()
Returns the counter for lines.

Returns:
counter for lines

getMethodCounter

ICounter getMethodCounter()
Returns the counter for methods.

Returns:
counter for methods

getClassCounter

ICounter getClassCounter()
Returns the counter for classes.

Returns:
counter for classes

getCounter

ICounter getCounter(ICoverageNode.CounterEntity entity)
Generic access to the the counters.

Parameters:
entity - entity we're we want to have the counter for
Returns:
counter for the given entity

getLines

ILines getLines()
Returns the line coverage information if this node represents a source file or a part of a source file.

Returns:
line coverage or null

getPlainCopy

ICoverageNode getPlainCopy()
Creates a plain copy of this node. While ICoverageNode implementations may contain heavy data structures, the copy returned by this method is reduced to the counters only. This helps tp save memory while processing huge structures.

Returns:
copy with counters only