hudson.plugins.codecover
Class CoverageObject<SELF extends CoverageObject<SELF>>

java.lang.Object
  extended by hudson.plugins.codecover.CoverageObject<SELF>
Direct Known Subclasses:
CodeCoverBuildAction, CoverageReport

@ExportedBean
public abstract class CoverageObject<SELF extends CoverageObject<SELF>>
extends Object

Base class of all coverage objects.

Author:
Kohsuke Kawaguchi

Constructor Summary
CoverageObject()
           
 
Method Summary
 void doGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Generates the graph that shows the coverage trend up to this report.
 hudson.model.Api getApi()
           
 Ratio getBranchCoverage()
           
abstract  hudson.model.AbstractBuild<?,?> getBuild()
          Gets the build object that owns the whole coverage report tree.
 Ratio getConditionCoverage()
           
 Ratio getLoopCoverage()
           
abstract  SELF getPreviousResult()
          Gets the corresponding coverage report object in the previous run that has the record.
 Ratio getStatementCoverage()
           
 boolean hasConditionCoverage()
           
 boolean hasStatementCoverage()
           
 boolean isFailed()
           
 String printFourCoverageColumns()
          Used in the view to print out four table columns with the coverage info.
protected static void printRatioCell(boolean failed, Ratio ratio, StringBuilder buf)
           
protected static void printRatioTable(Ratio ratio, StringBuilder buf)
           
 void setFailed()
          Marks this coverage object as failed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoverageObject

public CoverageObject()
Method Detail

isFailed

public boolean isFailed()

setFailed

public void setFailed()
Marks this coverage object as failed.

See Also:
Rule

getStatementCoverage

@Exported(inline=true)
public Ratio getStatementCoverage()

getBranchCoverage

@Exported(inline=true)
public Ratio getBranchCoverage()

getLoopCoverage

@Exported(inline=true)
public Ratio getLoopCoverage()

getConditionCoverage

@Exported(inline=true)
public Ratio getConditionCoverage()

getBuild

public abstract hudson.model.AbstractBuild<?,?> getBuild()
Gets the build object that owns the whole coverage report tree.


getPreviousResult

@Exported
public abstract SELF getPreviousResult()
Gets the corresponding coverage report object in the previous run that has the record.

Returns:
null if no earlier record was found.

printFourCoverageColumns

public String printFourCoverageColumns()
Used in the view to print out four table columns with the coverage info.


hasConditionCoverage

public boolean hasConditionCoverage()

hasStatementCoverage

public boolean hasStatementCoverage()

printRatioCell

protected static void printRatioCell(boolean failed,
                                     Ratio ratio,
                                     StringBuilder buf)

printRatioTable

protected static void printRatioTable(Ratio ratio,
                                      StringBuilder buf)

doGraph

public void doGraph(org.kohsuke.stapler.StaplerRequest req,
                    org.kohsuke.stapler.StaplerResponse rsp)
             throws IOException
Generates the graph that shows the coverage trend up to this report.

Throws:
IOException

getApi

public hudson.model.Api getApi()


Copyright © 2004-2011. All Rights Reserved.