Class VectorCastSourcePrinter

java.lang.Object
io.jenkins.plugins.coverage.metrics.source.VectorCastSourcePrinter
All Implemented Interfaces:
Serializable

public class VectorCastSourcePrinter extends Object
Provides all required information for a FileNode so that its source code can be rendered together with the line and mutation coverage in HTML.
See Also:
  • Method Details

    • renderLine

      public String renderLine(int line, String sourceCode)
      Main call to render the source line in HTML table format.
      Parameters:
      line - line number for the summary data
      sourceCode - line of source code
      Returns:
      string of the source code line in HTML format
    • getColumnHeader

      public String getColumnHeader()
      Gets the source code column header.
      Returns:
      string of the column header
    • getColorClass

      public String getColorClass(int line)
      Gets the color class depending on coverage types.
      Parameters:
      line - line number for the summary data
      Returns:
      string of the color
    • getMcdcPairTooltip

      public String getMcdcPairTooltip(int line)
      Constructs the tooltip depending on the coverage.
      Parameters:
      line - line number for the summary data
      Returns:
      the MCDC Pair tooltip
    • getfunctionCallTooltip

      public String getfunctionCallTooltip(int line)
      Constructs the tooltip depending on the coverage.
      Parameters:
      line - line number for the summary data
      Returns:
      the function call tooltip
    • getTooltip

      public String getTooltip(int covered, int missed, boolean checkAny, String description)
      Constructs the tooltip depending on the coverage.
      Parameters:
      covered - count of the covered coverage
      missed - count of the missed coverage
      checkAny - boolean to indicate if code should check for any covered bits
      description - Description of the coverage - MCDC/FCC
      Returns:
      string of the tooltip
    • getTooltip

      public String getTooltip(int line)
      Constructs the tooltip depending on the coverage.
      Parameters:
      line - line number for the summary data
      Returns:
      string of the tooltip
    • hasAnyMcdcPairCoverage

      public boolean hasAnyMcdcPairCoverage()
      Returns true if there is any MCDC Pair coverage.
      Returns:
      true if there is any MCDC Pair coverage
    • hasAnyFunctionCallCoverage

      public boolean hasAnyFunctionCallCoverage()
      Returns true if there is any Function Call coverage.
      Returns:
      true if there is any Function Call coverage
    • getMcdcPairCovered

      public int getMcdcPairCovered(int line)
      Returns the count of covered MCDC Pairs on a line.
      Parameters:
      line - line number for the summary data
      Returns:
      the number of covered MCDC Pairs on a line
    • getMcdcPairMissed

      public int getMcdcPairMissed(int line)
      Returns the count of missed MCDC Pairs on a line.
      Parameters:
      line - line number for the summary data
      Returns:
      the number of missed MCDC Pairs on a line
    • getFunctionCallCovered

      public int getFunctionCallCovered(int line)
      Returns the count of covered Function Calls on a line.
      Parameters:
      line - line number for the summary data
      Returns:
      the number of covered Function Calls on a line
    • getFunctionCallMissed

      public int getFunctionCallMissed(int line)
      Returns the count of missed Function Calls on a line.
      Parameters:
      line - line number for the summary data
      Returns:
      the number of missed Function Calls on a line
    • getMcdcPairSummaryColumn

      public String getMcdcPairSummaryColumn(int line)
      Creates the MCDC Pairs summary column.
      Parameters:
      line - line number for the summary data
      Returns:
      string of the MCDC Pairs summary column
    • getFunctionCallSummaryColumn

      public String getFunctionCallSummaryColumn(int line)
      Creates the function call summary column.
      Parameters:
      line - line number for the summary data
      Returns:
      string of the function call summary column
    • cleanupCode

      protected String cleanupCode(String content)
    • getSummaryColumn

      public String getSummaryColumn(int line)
    • getPath

      public final String getPath()
    • isPainted

      public boolean isPainted(int line)
    • getCovered

      public int getCovered(int line)
    • getMissed

      public int getMissed(int line)