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

java.lang.Object
  extended by hudson.plugins.emma.CoverageObject<SELF>
Direct Known Subclasses:
AbstractReport, EmmaBuildAction

@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 getBlockCoverage()
           
abstract  hudson.model.AbstractBuild<?,?> getBuild()
          Gets the build object that owns the whole coverage report tree.
 Ratio getClassCoverage()
           
 Ratio getConditionCoverage()
          Line coverage.
 Ratio getLineCoverage()
          Line coverage.
 Ratio getMethodCoverage()
           
abstract  SELF getPreviousResult()
          Gets the corresponding coverage report object in the previous run that has the record.
 boolean hasClassCoverage()
           
 boolean hasConditionCoverage()
           
 boolean hasLineCoverage()
           
 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

getClassCoverage

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

getMethodCoverage

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

getBlockCoverage

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

getLineCoverage

@Exported(inline=true)
public Ratio getLineCoverage()
Line coverage. Can be null if this information is not collected.


getConditionCoverage

@Exported(inline=true)
public Ratio getConditionCoverage()
Line coverage. Can be null if this information is not collected.


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()

hasLineCoverage

public boolean hasLineCoverage()

hasClassCoverage

public boolean hasClassCoverage()

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-2012 Hudson. All Rights Reserved.