Interface ICoverageNode
- All Known Subinterfaces:
IBundleCoverage, IClassCoverage, IMethodCoverage, IPackageCoverage, ISourceFileCoverage, ISourceNode
- All Known Implementing Classes:
BundleCoverageImpl, ClassCoverageImpl, CoverageNodeImpl, MethodCoverageImpl, PackageCoverageImpl, SourceFileCoverageImpl, SourceNodeImpl
public interface ICoverageNode
Interface for hierarchical coverage data nodes with different coverage
counters.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDifferent counter types supported by JaCoCo.static enumType of a Java element represented by aICoverageNodeinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether this node contains code relevant for code coverage.Returns the counter for branches.Returns the counter for classes.Returns the counter for cyclomatic complexity.Generic access to the counters.Returns the type of element represented by this node.Returns the counter for byte code instructions.Returns the counter for lines.Returns the counter for methods.getName()Returns the name of this node.Creates a plain copy of this node.
-
Method Details
-
getElementType
ICoverageNode.ElementType getElementType()Returns the type of element represented by this node.- Returns:
- type of this node
-
getName
-
getInstructionCounter
ICounter getInstructionCounter()Returns the counter for byte code instructions.- Returns:
- counter for instructions
-
getBranchCounter
-
getLineCounter
-
getComplexityCounter
ICounter getComplexityCounter()Returns the counter for cyclomatic complexity.- Returns:
- counter for complexity
-
getMethodCounter
-
getClassCounter
-
getCounter
Generic access to the counters.- Parameters:
entity- entity we're we want to have the counter for- Returns:
- counter for the given entity
-
containsCode
boolean containsCode()Checks whether this node contains code relevant for code coverage.- Returns:
trueif this node contains code relevant for code coverage
-
getPlainCopy
ICoverageNode getPlainCopy()Creates a plain copy of this node. WhileICoverageNodeimplementations may contain heavy data structures, the copy returned by this method is reduced to the counters only. This helps to save memory while processing huge structures.- Returns:
- copy with counters only
-