Package hudson.plugins.jacoco.report
Class AbstractReport<PARENT extends AggregatedReport<?,PARENT,?>,SELF extends CoverageObject<SELF>>
- java.lang.Object
-
- hudson.plugins.jacoco.model.CoverageObject<SELF>
-
- hudson.plugins.jacoco.report.AbstractReport<PARENT,SELF>
-
- Type Parameters:
PARENT
- Parent typeSELF
- Self type
- All Implemented Interfaces:
ModelObject
- Direct Known Subclasses:
AggregatedReport
,SourceFileReport
public abstract class AbstractReport<PARENT extends AggregatedReport<?,PARENT,?>,SELF extends CoverageObject<SELF>> extends CoverageObject<SELF> implements ModelObject
Base class of the coverage report tree, which maintains the details of the coverage report.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from class hudson.plugins.jacoco.model.CoverageObject
branch, clazz, complexity, instruction, line, maxBranch, maxClazz, maxComplexity, maxInstruction, maxLine, maxMethod, method
-
-
Constructor Summary
Constructors Constructor Description AbstractReport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCoverage(CoverageElement cv)
Run<?,?>
getBuild()
Gets the build object that owns the whole coverage report tree.String
getDisplayName()
String
getName()
PARENT
getParent()
Gets the back pointer to the parent coverage object.SELF
getPreviousResult()
Gets the corresponding coverage report object in the previous run that has the record.protected static String
sanitizeName(String name)
void
setName(String name)
protected void
setParent(PARENT p)
Called at the last stage of the tree construction, to set the back pointer.-
Methods inherited from class hudson.plugins.jacoco.model.CoverageObject
doGraph, getApi, getBranchCoverage, getClassCoverage, getComplexityScore, getInstructionCoverage, getLineCoverage, getMaxBranch, getMaxClazz, getMaxComplexity, getMaxInstruction, getMaxLine, getMaxMethod, getMethodCoverage, hasClassCoverage, hasLineCoverage, isFailed, printFourCoverageColumns, printRatioCell, printRatioTable, setAllCovTypes, setCoverage, setFailed, setMaxBranch, setMaxClazz, setMaxComplexity, setMaxInstruction, setMaxLine, setMaxMethod, toString
-
-
-
-
Method Detail
-
addCoverage
public void addCoverage(CoverageElement cv) throws IOException
- Throws:
IOException
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
-
setParent
protected void setParent(PARENT p)
Called at the last stage of the tree construction, to set the back pointer.- Parameters:
p
- parent
-
getParent
public PARENT getParent()
Gets the back pointer to the parent coverage object.- Overrides:
getParent
in classCoverageObject<SELF extends CoverageObject<SELF>>
-
getPreviousResult
public SELF getPreviousResult()
Description copied from class:CoverageObject
Gets the corresponding coverage report object in the previous run that has the record.- Specified by:
getPreviousResult
in classCoverageObject<SELF extends CoverageObject<SELF>>
- Returns:
- null if no earlier record was found.
-
getBuild
public Run<?,?> getBuild()
Description copied from class:CoverageObject
Gets the build object that owns the whole coverage report tree.- Specified by:
getBuild
in classCoverageObject<SELF extends CoverageObject<SELF>>
- Returns:
- the build object that owns the whole coverage report tree.
-
-