@ExportedBean(defaultVisibility=2) public class CoverageResult extends Object implements Serializable, Chartable
Instances of CoverageResult
form a tree structure to progressively represent smaller elements.
Modifier and Type | Field and Description |
---|---|
hudson.model.Run<?,?> |
owner |
Constructor and Description |
---|
CoverageResult(CoverageElement elementType,
CoverageResult parent,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
doCoverageHighlightedSource(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
void |
doGraph(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Generates the graph that shows the coverage trend up to this report.
|
hudson.model.Api |
getApi() |
CoverageResult |
getChild(String name) |
Set<CoverageElement> |
getChildElements()
Getter for property 'childElements'.
|
Set<CoverageMetric> |
getChildMetrics(CoverageElement element) |
Set<String> |
getChildren()
Getter for keys of property 'children'.
|
Set<String> |
getChildren(CoverageElement element) |
Map<String,CoverageResult> |
getChildrenReal()
Getter for property 'children'.
|
Ratio |
getCoverage(CoverageMetric metric) |
Ratio |
getCoverageWithEmpty(CoverageMetric metric) |
Object |
getDynamic(String token,
org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
CoverageElement |
getElement()
Getter for property 'element'.
|
Set<CoverageMetric> |
getMetrics()
Getter for property 'metrics'.
|
Set<CoverageMetric> |
getMetricsWithEmpty() |
String |
getName()
Getter for property 'name'.
|
hudson.model.Run<?,?> |
getOwner()
Getter for property 'owner'.
|
CoveragePaint |
getPaint()
Getter for property 'paint'.
|
Map<String,CoveragePaint> |
getPaintedSources()
Getter for property 'paintedSources'.
|
CoverageResult |
getParent()
Getter for property 'parent'.
|
List<CoverageResult> |
getParents()
Getter for property 'parents'.
|
CoverageResult |
getPreviousResult()
Getter for property 'previousResult'.
|
String |
getRelativeSourcePath()
Getter for property 'relativeSourcePath'.
|
Map<CoverageMetric,Ratio> |
getResults()
Getter for property 'results'.
|
CoverageTree |
getResultsAPI()
Getter for property 'results'.
|
String |
getSourceFileContent()
Getter for property 'sourceFileContent'.
|
boolean |
hasPermission() |
boolean |
isSourceCodeLevel()
Getter for property 'sourceCodeLevel'.
|
boolean |
isSourceFileAvailable()
Getter for property 'sourceFileAvailable'.
|
void |
paint(int line,
int hits) |
void |
paint(int line,
int hits,
int branchHits,
int branchTotal) |
String |
relativeUrl(CoverageResult parent) |
void |
setOwner(hudson.model.AbstractBuild<?,?> owner) |
void |
setOwner(hudson.model.Run<?,?> owner)
Setter for property 'owner'.
|
void |
setRelativeSourcePath(String relativeSourcePath)
Setter for property 'relativeSourcePath'.
|
void |
updateMetric(CoverageMetric metric,
Ratio additionalResult) |
String |
urlTransform(String name) |
String |
xmlTransform(String name) |
public CoverageResult(CoverageElement elementType, CoverageResult parent, String name)
public String getRelativeSourcePath()
public void setRelativeSourcePath(String relativeSourcePath)
relativeSourcePath
- Value to set for property 'relativeSourcePath'.public String getName()
public CoverageResult getParent()
public CoverageElement getElement()
public boolean isSourceCodeLevel()
public CoveragePaint getPaint()
public void paint(int line, int hits)
public void paint(int line, int hits, int branchHits, int branchTotal)
public boolean isSourceFileAvailable()
public boolean hasPermission()
public String getSourceFileContent()
public List<CoverageResult> getParents()
public Set<CoverageElement> getChildElements()
public Set<String> getChildren(CoverageElement element)
public Set<CoverageMetric> getChildMetrics(CoverageElement element)
public Set<String> getChildren()
public Map<String,CoverageResult> getChildrenReal()
public Map<CoverageMetric,Ratio> getResults()
getResults
in interface Chartable
@Exported(name="results") public CoverageTree getResultsAPI()
public String relativeUrl(CoverageResult parent)
public CoverageResult getChild(String name)
public Ratio getCoverage(CoverageMetric metric)
public Ratio getCoverageWithEmpty(CoverageMetric metric)
public Set<CoverageMetric> getMetrics()
public Set<CoverageMetric> getMetricsWithEmpty()
public void updateMetric(CoverageMetric metric, Ratio additionalResult)
public hudson.model.Run<?,?> getOwner()
public void setOwner(hudson.model.Run<?,?> owner)
owner
- Value to set for property 'owner'.public void setOwner(hudson.model.AbstractBuild<?,?> owner)
public CoverageResult getPreviousResult()
getPreviousResult
in interface Chartable
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
IOException
public void doCoverageHighlightedSource(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
IOException
public void doGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
req
- the stapler requestrsp
- the stapler responseIOException
- from StaplerResponse.sendRedirect2public Map<String,CoveragePaint> getPaintedSources()
public hudson.model.Api getApi()
Copyright © 2016–2021. All rights reserved.