Klasse FileCoverageNode
java.lang.Object
io.jenkins.plugins.coverage.model.CoverageNode
io.jenkins.plugins.coverage.model.FileCoverageNode
- Alle implementierten Schnittstellen:
Serializable
A
CoverageNode
for a specific file. It stores the actual file name along the coverage information.- Autor:
- Ullrich Hafner
- Siehe auch:
-
Konstruktorübersicht
KonstruktorBeschreibungFileCoverageNode
(String name, String sourcePath) Creates a newFileCoverageNode
with the given name. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
addChangedCodeLine
(int line) Adds a code line that has been changed.protected CoverageNode
Creates a copied instance of this node that has no children, leaves, and parent yet.protected FileCoverageNode
copyTree
(CoverageNode copiedParent) Recursively copies the coverage tree with the passedCoverageNode
as root.boolean
getFileCoverageDeltaForMetric
(CoverageMetric coverageMetric) Gets the file coverage delta for the passedCoverageMetric
.getPath()
Returns the source code path of this node.boolean
hasFileCoverageDelta
(CoverageMetric coverageMetric) Checks whether the file coverage delta exists for the passedCoverageMetric
.int
hashCode()
void
putCoveragePerLine
(int line, Coverage coverage) Adds theCoverage
for a specific line of code.void
putFileCoverageDelta
(CoverageMetric coverageMetric, CoveragePercentage delta) Adds afile coverage delta
of this file against a reference for the passedCoverageMetric
.void
putIndirectCoverageChange
(int line, int hitsDelta) Adds an indirect coverage change for a specific line.protected Object
Called after de-serialization to retain backward compatibility.void
setChangedCodeLines
(SortedSet<Integer> changes) void
setCoveragePerLine
(SortedMap<Integer, Coverage> coverage) void
setFileCoverageDelta
(SortedMap<CoverageMetric, CoveragePercentage> fileCoverageDelta) void
setIndirectCoverageChanges
(SortedMap<Integer, Integer> changes) Von Klasse geerbte Methoden io.jenkins.plugins.coverage.model.CoverageNode
add, add, computeDelta, computeDeltaAsPercentage, copyTree, filterPackageStructure, find, findByHashCode, getAll, getAllFileCoverageNodes, getChangeCoverageTree, getChildren, getCoverage, getFileAmountWithChangedCoverage, getFileAmountWithIndirectCoverageChanges, getImportantMetrics, getIndirectCoverageChangesTree, getLeaves, getLineAmountWithChangedCoverage, getLineAmountWithIndirectCoverageChanges, getMetric, getMetricFractions, getMetricPercentages, getMetrics, getMetricsDistribution, getName, getParent, getParentName, hasChangeCoverage, hasChangeCoverage, hasCodeChanges, hasIndirectCoverageChanges, hasIndirectCoverageChanges, hasParent, isRoot, mergePath, printCoverageFor, printCoverageFor, splitPackages, toString
-
Konstruktordetails
-
FileCoverageNode
Creates a newFileCoverageNode
with the given name.- Parameter:
name
- the human-readable name of the nodesourcePath
- optional path to the source code of this node
-
-
Methodendetails
-
getPath
Beschreibung aus Klasse kopiert:CoverageNode
Returns the source code path of this node.- Setzt außer Kraft:
getPath
in KlasseCoverageNode
- Gibt zurück:
- the element type
-
readResolve
Called after de-serialization to retain backward compatibility.- Setzt außer Kraft:
readResolve
in KlasseCoverageNode
- Gibt zurück:
- this
- Löst aus:
ObjectStreamException
- if the operation failed
-
hasFileCoverageDelta
Checks whether the file coverage delta exists for the passedCoverageMetric
.- Parameter:
coverageMetric
- The coverage metric- Gibt zurück:
true
whether the coverage delta exists, elsefalse
-
getFileCoverageDeltaForMetric
Gets the file coverage delta for the passedCoverageMetric
.- Parameter:
coverageMetric
- The coverage metric- Gibt zurück:
- the file coverage delta as percentage
-
addChangedCodeLine
public void addChangedCodeLine(int line) Adds a code line that has been changed.- Parameter:
line
- The changed code line
-
putFileCoverageDelta
Adds afile coverage delta
of this file against a reference for the passedCoverageMetric
.- Parameter:
coverageMetric
- The coverage metricdelta
- The coverage delta as percentage
-
putCoveragePerLine
Adds theCoverage
for a specific line of code.- Parameter:
line
- The linecoverage
- The coverage
-
putIndirectCoverageChange
public void putIndirectCoverageChange(int line, int hitsDelta) Adds an indirect coverage change for a specific line.- Parameter:
line
- The line with the coverage changehitsDelta
- The delta of the coverage hits before and after the code changes
-
setFileCoverageDelta
-
setChangedCodeLines
-
getChangedCodeLines
-
setCoveragePerLine
-
getCoveragePerLine
-
getIndirectCoverageChanges
-
setIndirectCoverageChanges
-
copyTree
Beschreibung aus Klasse kopiert:CoverageNode
Recursively copies the coverage tree with the passedCoverageNode
as root.- Setzt außer Kraft:
copyTree
in KlasseCoverageNode
- Parameter:
copiedParent
- The root node- Gibt zurück:
- the copied tree
-
copyEmpty
Beschreibung aus Klasse kopiert:CoverageNode
Creates a copied instance of this node that has no children, leaves, and parent yet.- Setzt außer Kraft:
copyEmpty
in KlasseCoverageNode
- Gibt zurück:
- the new and empty node
-
equals
- Setzt außer Kraft:
equals
in KlasseCoverageNode
-
hashCode
public int hashCode()- Setzt außer Kraft:
hashCode
in KlasseCoverageNode
-