org.jacoco.core.internal.analysis
Class MethodCoverageImpl
java.lang.Object
org.jacoco.core.analysis.CoverageNodeImpl
org.jacoco.core.internal.analysis.SourceNodeImpl
org.jacoco.core.internal.analysis.MethodCoverageImpl
- All Implemented Interfaces:
- ICoverageNode, IMethodCoverage, ISourceNode
public class MethodCoverageImpl
- extends SourceNodeImpl
- implements IMethodCoverage
Implementation of IMethodCoverage.
| Methods inherited from class org.jacoco.core.analysis.CoverageNodeImpl |
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy, increment, increment, toString |
| Methods inherited from interface org.jacoco.core.analysis.ICoverageNode |
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy |
MethodCoverageImpl
public MethodCoverageImpl(String name,
String desc,
String signature)
- Creates a method coverage data object with the given parameters.
- Parameters:
name - name of the methoddesc - method descriptorsignature - generic signature or null
increment
public void increment(ICounter instructions,
ICounter branches,
int line)
- Description copied from class:
SourceNodeImpl
- Increments instructions and branches by the given counter values. If an
optional line number is specified the instructions and branches are added
to the given line. The line counter is incremented accordingly.
- Overrides:
increment in class SourceNodeImpl
- Parameters:
instructions - instructions to addbranches - branches to addline - optional line number or ISourceNode.UNKNOWN_LINE
incrementMethodCounter
public void incrementMethodCounter()
- This method must be called exactly once after all instructions and
branches have been incremented for this method coverage node.
applyFragment
public boolean applyFragment(SourceNodeImpl fragment)
- Overrides:
applyFragment in class SourceNodeImpl
- Parameters:
fragment - fragment to apply
- Returns:
true if fragment contains lines of this node
getDesc
public String getDesc()
- Description copied from interface:
IMethodCoverage
- Returns the descriptor of the method.
- Specified by:
getDesc in interface IMethodCoverage
- Returns:
- descriptor
getSignature
public String getSignature()
- Description copied from interface:
IMethodCoverage
- Returns the generic signature of the method if defined.
- Specified by:
getSignature in interface IMethodCoverage
- Returns:
- generic signature or
null
Copyright © 2009–2025 Mountainminds GmbH & Co. KG. All rights reserved.