public class SourceNodeImpl extends CoverageNodeImpl implements ISourceNode
ISourceNode
.ICoverageNode.CounterEntity, ICoverageNode.ElementType
branchCounter, classCounter, complexityCounter, instructionCounter, lineCounter, methodCounter
UNKNOWN_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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy
public 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_LINE
last
- last line number or ISourceNode.UNKNOWN_LINE
public 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_LINE
public int getFirstLine()
ISourceNode
getFirstLine
in interface ISourceNode
ISourceNode.UNKNOWN_LINE
public int getLastLine()
ISourceNode
getLastLine
in interface ISourceNode
ISourceNode.UNKNOWN_LINE
public LineImpl getLine(int nr)
ISourceNode
getLine
in interface ISourceNode
nr
- line number of interestCopyright © 2018. All rights reserved.