public class SourceNodeImpl extends CoverageNodeImpl implements ISourceNode
ISourceNode.ICoverageNode.CounterEntity, ICoverageNode.ElementTypebranchCounter, classCounter, complexityCounter, instructionCounter, lineCounter, methodCounterUNKNOWN_LINE| Constructor and Description |
|---|
SourceNodeImpl(ICoverageNode.ElementType elementType,
String name)
Create a new source node implementation instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ensureCapacity(int first,
int last)
Make sure that the internal buffer can keep lines from first to last.
|
int |
getFirstLine()
The number of the first line coverage information is available for.
|
int |
getLastLine()
The number of the last line coverage information is available for.
|
LineImpl |
getLine(int nr)
Returns the line information for given line.
|
void |
increment(ICounter instructions,
ICounter branches,
int line)
Increments instructions and branches by the given counter values.
|
void |
increment(ISourceNode child)
Increments all counters by the values of the given child.
|
getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy, increment, increment, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopypublic SourceNodeImpl(ICoverageNode.ElementType elementType, String name)
elementType - element typename - name of the elementpublic void ensureCapacity(int first,
int last)
first - first line number or ISourceNode.UNKNOWN_LINElast - last line number or ISourceNode.UNKNOWN_LINEpublic void increment(ISourceNode child)
child - child node to addpublic void increment(ICounter instructions, ICounter branches, int line)
instructions - instructions to addbranches - branches to addline - optional line number or ISourceNode.UNKNOWN_LINEpublic int getFirstLine()
ISourceNodegetFirstLine in interface ISourceNodeISourceNode.UNKNOWN_LINEpublic int getLastLine()
ISourceNodegetLastLine in interface ISourceNodeISourceNode.UNKNOWN_LINEpublic LineImpl getLine(int nr)
ISourceNodegetLine in interface ISourceNodenr - line number of interestCopyright © 2024. All rights reserved.