Klasse CoverageResult
java.lang.Object
io.jenkins.plugins.coverage.targets.CoverageResult
- Alle implementierten Schnittstellen:
ModelObject,Chartable,Serializable
@ExportedBean(defaultVisibility=2)
public class CoverageResult
extends Object
implements Serializable, Chartable, ModelObject
Coverage result for a specific programming element.
Instances ofCoverageResult form a tree structure to progressively represent smaller elements.- Seit:
- 22-Aug-2007 18:47:10
- Autor:
- Stephen Connolly
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCoverageResult(CoverageElement elementType, CoverageResult parent, String name) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddAdditionalProperty(String propertyName, String value) voidadd parent for CoverageResult(Only effect when parent is null)Finds the coverage element with the given name.getAdditionalProperty(String propertyName) getAll(CoverageElement element) Returns recursively all elements of the given type.floatVeraltet.Getter for property 'childElements'.Getter for keys of property 'children'.getChildren(CoverageElement element) getCoverage(CoverageElement element) floatgetCoverageDelta(CoverageElement element) Get delta coverage fromdeltaResultsfor a specificCoverageElement.getCoverageFor(CoverageElement coverageElement) Returns the coverage ratio for the specified element.getDelta(CoverageElement coverageElement) Returns the delta result with respect to the reference build.getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) getLast()getName()Run<?, ?> getOwner()Getter for property 'owner'.getPaint()Getter for property 'paintedSources'.Returns the name of the parent element or "-" if there is no such element.Getter for property 'parents'.Getter for property 'previousResult'.Getter for property 'results'.getRoot()If the report is an aggregation with a single report just remove the aggregation.Returns the singleton child of this result.Getter for property 'sourceFileContent'.getTag()booleanhasDelta(CoverageElement coverageElement) Returns whether a delta result with respect to the reference build is available.booleanReturns whether this result has a parent.booleanbooleanReturns whether a delta computation with a reference build is available.booleanReturns whether this result has a singleton child.booleanbooleanbooleanGetter for property 'sourceFileAvailable'.Interface for javascript code to get child coverage result.Interface for javascript code to get code coverage result.Interface for javascript code to get code coverage trend.voidmerge(CoverageResult another) voidpaint(int line, int hits) voidpaint(int line, int hits, int branchHits, int branchTotal) printCoverageFor(CoverageElement coverageElement) Prints the coverage for the specified element.relativeUrl(CoverageResult parent) voidvoidsetChangeRequestCoverageDiffWithTargetBranch(float changeRequestCoverageDiffWithTargetBranch) Veraltet.diff coverage is stored indeltaResults.voidsetDeltaResults(Map<CoverageElement, Float> deltaResults) voidvoidsetOwner(AbstractBuild<?, ?> owner) voidSetter for property 'owner'.voidsetReferenceBuildUrl(String referenceBuildUrl) voidsetRelativeSourcePath(String relativeSourcePath) voidvoidIf the report contains a single group just remove the group.toString()voidupdateCoverage(CoverageElement element, Ratio additionalResult) urlTransform(String name) xmlTransform(String name)
-
Felddetails
-
owner
-
-
Konstruktordetails
-
CoverageResult
-
-
Methodendetails
-
stripGroup
public void stripGroup()If the report contains a single group just remove the group. -
getRoot
If the report is an aggregation with a single report just remove the aggregation.- Gibt zurück:
- the actual root of the hierarchy
-
toString
-
hasDelta
Returns whether a delta result with respect to the reference build is available.- Parameter:
coverageElement- the element to check- Gibt zurück:
trueif a delta result is available,falseotherwise
-
getDelta
Returns the delta result with respect to the reference build.- Parameter:
coverageElement- the element to get the delta for- Gibt zurück:
- the delta result (if available)
-
hasReferenceBuild
public boolean hasReferenceBuild()Returns whether a delta computation with a reference build is available.- Gibt zurück:
trueif there is a reference build,falseif not
-
getLocalResults
-
getSingletonChild
Returns the singleton child of this result.- Gibt zurück:
- the singleton child of this result
- Löst aus:
NoSuchElementException- if this result does not contain children- Siehe auch:
-
hasSingletonChild
public boolean hasSingletonChild()Returns whether this result has a singleton child.- Gibt zurück:
trueif this result has a singleton child,falseotherwise
-
hasParent
public boolean hasParent()Returns whether this result has a parent.- Gibt zurück:
trueif this result has a parent,falseif it is the root of the hierarchy
-
getParentName
Returns the name of the parent element or "-" if there is no such element.- Gibt zurück:
- the name of the parent element
-
getAll
Returns recursively all elements of the given type.- Parameter:
element- the element type to look for- Gibt zurück:
- all elements of the given type
-
find
Finds the coverage element with the given name.- Parameter:
element- the coverage element namename- the name of the coverage instance- Gibt zurück:
- the result if found
-
getCoverageFor
Returns the coverage ratio for the specified element.- Parameter:
coverageElement- the element to get the coverage ratio for- Gibt zurück:
- coverage ratio if available
-
printCoverageFor
Prints the coverage for the specified element.- Parameter:
coverageElement- the element to print the coverage for- Gibt zurück:
- coverage ratio in a human-readable format
-
getRelativeSourcePath
-
setRelativeSourcePath
-
getName
-
setName
-
getParent
-
getElement
-
isSourceCodeLevel
public boolean isSourceCodeLevel() -
isAggregatedLevel
public boolean isAggregatedLevel() -
getPaint
-
paint
public void paint(int line, int hits) -
paint
public void paint(int line, int hits, int branchHits, int branchTotal) -
getCoverageDelta
Get delta coverage fromdeltaResultsfor a specificCoverageElement.- Parameter:
element- the element to get the diff coverage for.- Gibt zurück:
- the diff coverage or 0, if diff coverage for element is not available.
-
getChangeRequestCoverageDiffWithTargetBranch
Veraltet.usegetCoverageDelta(CoverageElement)instead.Getter for property 'changeRequestCoverageDiffWithTargetBranch'.- Gibt zurück:
- Value for property 'changeRequestCoverageDiffWithTargetBranch'.
-
setChangeRequestCoverageDiffWithTargetBranch
@Deprecated public void setChangeRequestCoverageDiffWithTargetBranch(float changeRequestCoverageDiffWithTargetBranch) Veraltet.diff coverage is stored indeltaResults.Setter for property 'changeRequestCoverageDiffWithTargetBranch'.- Parameter:
changeRequestCoverageDiffWithTargetBranch- Value to set for property 'changeRequestCoverageDiffWithTargetBranch'.
-
getReferenceBuildUrl
-
setReferenceBuildUrl
-
isSourceFileAvailable
public boolean isSourceFileAvailable()Getter for property 'sourceFileAvailable'.- Gibt zurück:
- Value for property 'sourceFileAvailable'.
-
hasPermission
public boolean hasPermission() -
getSourceFileContent
Getter for property 'sourceFileContent'.- Gibt zurück:
- Value for property 'sourceFileContent'.
-
getParents
Getter for property 'parents'.- Gibt zurück:
- Value for property 'parents'.
-
getChildElements
Getter for property 'childElements'.- Gibt zurück:
- Value for property 'childElements'.
-
getChildElement
-
getChildren
-
getChildren
Getter for keys of property 'children'.- Gibt zurück:
- Value for keys of property 'children'.
-
getChildrenReal
-
getResults
- Angegeben von:
getResultsin SchnittstelleChartable
-
getDeltaResults
-
setDeltaResults
-
getResultsAPI
Getter for property 'results'.- Gibt zurück:
- Value for property 'results'.
-
getCoverageTrends
-
urlTransform
-
xmlTransform
-
relativeUrl
-
getChild
-
getCoverage
-
getElements
-
updateCoverage
-
getOwner
Getter for property 'owner'. -
setOwner
Setter for property 'owner'.- Parameter:
owner- Value to set for property 'owner'.
-
setOwner
-
merge
- Löst aus:
CoverageException
-
getTag
-
setTag
-
getPreviousResult
Getter for property 'previousResult'.- Angegeben von:
getPreviousResultin SchnittstelleChartable- Gibt zurück:
- Value for property 'previousResult'.
-
getDynamic
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException - Löst aus:
IOException
-
getPaintedSources
Getter for property 'paintedSources'.- Gibt zurück:
- Value for property 'paintedSources'.
-
getLast
-
addParent
add parent for CoverageResult(Only effect when parent is null)- Parameter:
p- parent
-
resetParent
-
addAdditionalProperty
-
getAdditionalProperty
-
jsGetResults
Interface for javascript code to get code coverage result.- Gibt zurück:
- aggregated coverage results
-
jsGetChildResults
Interface for javascript code to get child coverage result.- Gibt zurück:
- aggregated child coverage results
-
jsGetTrendResults
Interface for javascript code to get code coverage trend.- Gibt zurück:
- coverage trend
-
getDisplayName
- Angegeben von:
getDisplayNamein SchnittstelleModelObject
-
getCoverageDelta(CoverageElement)instead.