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
KonstruktorenKonstruktorBeschreibungFileCoverageNode(String name, String sourcePath) Creates a newFileCoverageNodewith the given name. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddChangedCodeLine(int line) Adds a code line that has been changed.protected CoverageNodeCreates a copied instance of this node that has no children, leaves, and parent yet.protected FileCoverageNodecopyTree(CoverageNode copiedParent) Recursively copies the coverage tree with the passedCoverageNodeas root.booleangetFileCoverageDeltaForMetric(CoverageMetric coverageMetric) Gets the file coverage delta for the passedCoverageMetric.getPath()Returns the source code path of this node.booleanhasFileCoverageDelta(CoverageMetric coverageMetric) Checks whether the file coverage delta exists for the passedCoverageMetric.inthashCode()voidputCoveragePerLine(int line, Coverage coverage) Adds theCoveragefor a specific line of code.voidputFileCoverageDelta(CoverageMetric coverageMetric, CoveragePercentage delta) Adds afile coverage deltaof this file against a reference for the passedCoverageMetric.voidputIndirectCoverageChange(int line, int hitsDelta) Adds an indirect coverage change for a specific line.protected ObjectCalled after de-serialization to retain backward compatibility.voidsetChangedCodeLines(SortedSet<Integer> changes) voidsetCoveragePerLine(SortedMap<Integer, Coverage> coverage) voidsetFileCoverageDelta(SortedMap<CoverageMetric, CoveragePercentage> fileCoverageDelta) voidsetIndirectCoverageChanges(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 newFileCoverageNodewith 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:CoverageNodeReturns the source code path of this node.- Setzt außer Kraft:
getPathin KlasseCoverageNode- Gibt zurück:
- the element type
-
readResolve
Called after de-serialization to retain backward compatibility.- Setzt außer Kraft:
readResolvein 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:
truewhether 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 deltaof this file against a reference for the passedCoverageMetric.- Parameter:
coverageMetric- The coverage metricdelta- The coverage delta as percentage
-
putCoveragePerLine
Adds theCoveragefor 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:CoverageNodeRecursively copies the coverage tree with the passedCoverageNodeas root.- Setzt außer Kraft:
copyTreein KlasseCoverageNode- Parameter:
copiedParent- The root node- Gibt zurück:
- the copied tree
-
copyEmpty
Beschreibung aus Klasse kopiert:CoverageNodeCreates a copied instance of this node that has no children, leaves, and parent yet.- Setzt außer Kraft:
copyEmptyin KlasseCoverageNode- Gibt zurück:
- the new and empty node
-
equals
- Setzt außer Kraft:
equalsin KlasseCoverageNode
-
hashCode
public int hashCode()- Setzt außer Kraft:
hashCodein KlasseCoverageNode
-