public class JavaFilePage extends AbstractPage implements Page
Modifier and Type | Field and Description |
---|---|
(package private) java.util.SortedSet |
coverageUnion
This set is important for ordering all the coverage lines as they
come in- the algorithm that highlights uncovered lines is
dependent on all the lines being in order.
|
(package private) java.util.Set |
instrumentations
We can receive multiple instrumentation contributions, since a
single java source file can contain multiple classes (although
strictly only one of these can be declared
public ). |
(package private) static org.apache.log4j.Logger |
logger |
(package private) JavaFileLine |
masterLine
The line that summarizes this detail page.
|
(package private) java.util.Set |
validSourceLines
We want to know which of the lines are valid, because we don't
want to count lines that are impossible to reach (blank lines,
braces, import statements, method headers, etc..) in the coverage
calculations and highlighting.
|
Constructor and Description |
---|
JavaFilePage() |
Modifier and Type | Method and Description |
---|---|
void |
addInstrumentation(Instrumentation instrumentation)
We add instrumentation to this instance, so we can work out which lines are hit and which are not.
|
double |
getBranchCoverageRate() |
JavaFileLine |
getJavaFileLine() |
double |
getLineCoverageRate() |
java.util.Set |
getSourceFileLineCoverageSet() |
int |
getSourceLinesCount() |
java.util.Set |
getValidSourceLines() |
void |
setMasterLine(Line masterLine)
This method overrides
AbstractPage.setMasterLine(com.jcoverage.reporting.Line) so that
we have convenient access to our master line, and don't have to
constantly cast it. |
addCategory, addLineReference, close, createLine, getCategories, getLabel, getLines, getMasterLine, instantiateLineForCategory, isClosed, lookupLineByField, setReport
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCategory, addLineReference, createLine, getCategories, getLabel, getLines, getMasterLine, lookupLineByField, setReport
static org.apache.log4j.Logger logger
java.util.Set instrumentations
public
).JavaFileLine masterLine
java.util.SortedSet coverageUnion
java.util.Set validSourceLines
public JavaFilePage()
public java.util.Set getSourceFileLineCoverageSet()
public JavaFileLine getJavaFileLine()
public void addInstrumentation(Instrumentation instrumentation)
public void setMasterLine(Line masterLine)
AbstractPage.setMasterLine(com.jcoverage.reporting.Line)
so that
we have convenient access to our master line, and don't have to
constantly cast it.setMasterLine
in interface Page
setMasterLine
in class AbstractPage
Page.getMasterLine()
public java.util.Set getValidSourceLines()
public int getSourceLinesCount()
public double getLineCoverageRate()
public double getBranchCoverageRate()