Klasse FileCoverageNode

java.lang.Object
io.jenkins.plugins.coverage.model.CoverageNode
io.jenkins.plugins.coverage.model.FileCoverageNode
Alle implementierten Schnittstellen:
Serializable

public class FileCoverageNode extends CoverageNode
A CoverageNode for a specific file. It stores the actual file name along the coverage information.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • FileCoverageNode

      public FileCoverageNode(String name, @CheckForNull String sourcePath)
      Creates a new FileCoverageNode with the given name.
      Parameter:
      name - the human-readable name of the node
      sourcePath - optional path to the source code of this node
  • Methodendetails

    • getPath

      public String getPath()
      Beschreibung aus Klasse kopiert: CoverageNode
      Returns the source code path of this node.
      Setzt außer Kraft:
      getPath in Klasse CoverageNode
      Gibt zurück:
      the element type
    • readResolve

      protected Object readResolve() throws ObjectStreamException
      Called after de-serialization to retain backward compatibility.
      Setzt außer Kraft:
      readResolve in Klasse CoverageNode
      Gibt zurück:
      this
      Löst aus:
      ObjectStreamException - if the operation failed
    • hasFileCoverageDelta

      public boolean hasFileCoverageDelta(CoverageMetric coverageMetric)
      Checks whether the file coverage delta exists for the passed CoverageMetric.
      Parameter:
      coverageMetric - The coverage metric
      Gibt zurück:
      true whether the coverage delta exists, else false
    • getFileCoverageDeltaForMetric

      public CoveragePercentage getFileCoverageDeltaForMetric(CoverageMetric coverageMetric)
      Gets the file coverage delta for the passed CoverageMetric.
      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

      public void putFileCoverageDelta(CoverageMetric coverageMetric, CoveragePercentage delta)
      Adds a file coverage delta of this file against a reference for the passed CoverageMetric.
      Parameter:
      coverageMetric - The coverage metric
      delta - The coverage delta as percentage
    • putCoveragePerLine

      public void putCoveragePerLine(int line, Coverage coverage)
      Adds the Coverage for a specific line of code.
      Parameter:
      line - The line
      coverage - 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 change
      hitsDelta - The delta of the coverage hits before and after the code changes
    • setFileCoverageDelta

      public void setFileCoverageDelta(SortedMap<CoverageMetric,CoveragePercentage> fileCoverageDelta)
    • setChangedCodeLines

      public void setChangedCodeLines(SortedSet<Integer> changes)
    • getChangedCodeLines

      public SortedSet<Integer> getChangedCodeLines()
    • setCoveragePerLine

      public void setCoveragePerLine(SortedMap<Integer,Coverage> coverage)
    • getCoveragePerLine

      public SortedMap<Integer,Coverage> getCoveragePerLine()
    • getIndirectCoverageChanges

      public SortedMap<Integer,Integer> getIndirectCoverageChanges()
    • setIndirectCoverageChanges

      public void setIndirectCoverageChanges(SortedMap<Integer,Integer> changes)
    • copyTree

      protected FileCoverageNode copyTree(@CheckForNull CoverageNode copiedParent)
      Beschreibung aus Klasse kopiert: CoverageNode
      Recursively copies the coverage tree with the passed CoverageNode as root.
      Setzt außer Kraft:
      copyTree in Klasse CoverageNode
      Parameter:
      copiedParent - The root node
      Gibt zurück:
      the copied tree
    • copyEmpty

      protected CoverageNode 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 Klasse CoverageNode
      Gibt zurück:
      the new and empty node
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse CoverageNode
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse CoverageNode