public class DefaultCoverage extends DefaultStorable implements NewCoverage
storage
Constructor and Description |
---|
DefaultCoverage() |
DefaultCoverage(SensorStorage storage) |
Modifier and Type | Method and Description |
---|---|
int |
conditions() |
NewCoverage |
conditions(int line,
int conditions,
int coveredConditions)
Call this method as many time as needed to report coverage of conditions.
|
SortedMap<Integer,Integer> |
conditionsByLine() |
int |
coveredConditions() |
SortedMap<Integer,Integer> |
coveredConditionsByLine() |
int |
coveredLines() |
void |
doSave() |
SortedMap<Integer,Integer> |
hitsByLine() |
InputFile |
inputFile() |
NewCoverage |
lineHits(int line,
int hits)
Call this method as many time as needed to report coverage hits per line.
|
int |
linesToCover() |
NewCoverage |
ofType(CoverageType type) |
DefaultCoverage |
onFile(InputFile inputFile)
The covered file.
|
CoverageType |
type() |
save, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
save
public DefaultCoverage()
public DefaultCoverage(@Nullable SensorStorage storage)
public DefaultCoverage onFile(InputFile inputFile)
NewCoverage
onFile
in interface NewCoverage
public NewCoverage ofType(CoverageType type)
ofType
in interface NewCoverage
public CoverageType type()
public NewCoverage lineHits(int line, int hits)
NewCoverage
lineHits
in interface NewCoverage
line
- Line number (starts at 1).hits
- Number of time the line was hit.public NewCoverage conditions(int line, int conditions, int coveredConditions)
NewCoverage
conditions
in interface NewCoverage
line
- Line number (starts at 1).conditions
- Number of conditions on this line (should be greater than 1).coveredConditions
- Number of covered conditions.public int coveredLines()
public int linesToCover()
public int conditions()
public int coveredConditions()
public SortedMap<Integer,Integer> hitsByLine()
public SortedMap<Integer,Integer> conditionsByLine()
public SortedMap<Integer,Integer> coveredConditionsByLine()
public void doSave()
doSave
in class DefaultStorable
Copyright © 2009–2017 SonarSource. All rights reserved.