Package org.jacoco.core.analysis
Interface ICoverageNode
-
- All Known Subinterfaces:
IBundleCoverage,IClassCoverage,IMethodCoverage,IPackageCoverage,ISourceFileCoverage,ISourceNode
- All Known Implementing Classes:
BundleCoverageImpl,ClassCoverageImpl,CoverageNodeImpl,MethodCoverageImpl,PackageCoverageImpl,SourceFileCoverageImpl,SourceNodeImpl
public interface ICoverageNodeInterface for hierarchical coverage data nodes with different coverage counters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classICoverageNode.CounterEntityDifferent counter types supported by JaCoCo.static classICoverageNode.ElementTypeType of a Java element represented by aICoverageNodeinstance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsCode()Checks whether this node contains code relevant for code coverage.ICountergetBranchCounter()Returns the counter for branches.ICountergetClassCounter()Returns the counter for classes.ICountergetComplexityCounter()Returns the counter for cyclomatic complexity.ICountergetCounter(ICoverageNode.CounterEntity entity)Generic access to the the counters.ICoverageNode.ElementTypegetElementType()Returns the type of element represented by this node.ICountergetInstructionCounter()Returns the counter for byte code instructions.ICountergetLineCounter()Returns the counter for lines.ICountergetMethodCounter()Returns the counter for methods.java.lang.StringgetName()Returns the name of this node.ICoverageNodegetPlainCopy()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
java.lang.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
-
getBranchCounter
ICounter getBranchCounter()
Returns the counter for branches.- Returns:
- counter for branches
-
getLineCounter
ICounter getLineCounter()
Returns the counter for lines.- Returns:
- counter for lines
-
getComplexityCounter
ICounter getComplexityCounter()
Returns the counter for cyclomatic complexity.- Returns:
- counter for complexity
-
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
-
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
-
-