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
Implementation of
IMethodCoverage.-
Nested Class Summary
Nested classes/interfaces inherited from interface ICoverageNode
ICoverageNode.CounterEntity, ICoverageNode.ElementType -
Field Summary
FieldsFields inherited from class CoverageNodeImpl
branchCounter, classCounter, complexityCounter, instructionCounter, lineCounter, methodCounterFields inherited from interface ISourceNode
UNKNOWN_LINE -
Constructor Summary
ConstructorsConstructorDescriptionMethodCoverageImpl(String name, String desc, String signature) Creates a method coverage data object with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetDesc()Returns the descriptor of the method.Returns the generic signature of the method if defined.voidIncrements instructions and branches by the given counter values.voidThis method must be called exactly once after all instructions and branches have been incremented for this method coverage node.Methods inherited from class SourceNodeImpl
ensureCapacity, getFirstLine, getLastLine, getLine, incrementMethods inherited from class CoverageNodeImpl
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy, increment, increment, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ICoverageNode
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopyMethods inherited from interface ISourceNode
getFirstLine, getLastLine, getLine
-
Field Details
-
desc
-
signature
-
-
Constructor Details
-
MethodCoverageImpl
-
-
Method Details
-
increment
Description copied from class:SourceNodeImplIncrements instructions and branches by the given counter values. If a optional line number is specified the instructions and branches are added to the given line. The line counter is incremented accordingly.- Overrides:
incrementin classSourceNodeImpl- Parameters:
instructions- instructions to addbranches- branches to addline- optional line number orISourceNode.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. -
getDesc
Description copied from interface:IMethodCoverageReturns the descriptor of the method.- Specified by:
getDescin interfaceIMethodCoverage- Returns:
- descriptor
-
getSignature
Description copied from interface:IMethodCoverageReturns the generic signature of the method if defined.- Specified by:
getSignaturein interfaceIMethodCoverage- Returns:
- generic signature or
null
-