hudson.plugins.jacoco.model
Class CoverageObject<SELF extends CoverageObject<SELF>>

java.lang.Object
  extended by hudson.plugins.jacoco.model.CoverageObject<SELF>
Direct Known Subclasses:
AbstractReport, JacocoBuildAction

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

Base class of all coverage objects.

Author:
Kohsuke Kawaguchi

Field Summary
 Coverage branch
           
 Coverage clazz
           
 Coverage complexity
           
 Coverage instruction
           
 Coverage line
           
 int maxBranch
          Deprecated. 
 int maxClazz
          Deprecated. 
 int maxComplexity
          Deprecated. 
 int maxCoveredBranch
           
 int maxCoveredClazz
          Variables used to store which child has to highest coverage for each coverage type.
 int maxCoveredComplexity
           
 int maxCoveredInstruction
           
 int maxCoveredLine
           
 int maxCoveredMethod
           
 int maxInstruction
          Deprecated. 
 int maxLine
          Deprecated. 
 int maxMethod
          Deprecated. 
 int maxMissedBranch
           
 int maxMissedClazz
           
 int maxMissedComplexity
           
 int maxMissedInstruction
           
 int maxMissedLine
           
 int maxMissedMethod
           
 Coverage method
           
 
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()
           
 Coverage getBranchCoverage()
           
abstract  hudson.model.AbstractBuild<?,?> getBuild()
          Gets the build object that owns the whole coverage report tree.
 Coverage getClassCoverage()
           
 Coverage getComplexityScore()
           
 Coverage getInstructionCoverage()
           
 Coverage getLineCoverage()
          Line coverage.
 int getMaxCoveredBranch()
           
 int getMaxCoveredClazz()
           
 int getMaxCoveredComplexity()
           
 int getMaxCoveredInstruction()
           
 int getMaxCoveredLine()
           
 int getMaxCoveredMethod()
           
 int getMaxMissedBranch()
           
 int getMaxMissedClazz()
           
 int getMaxMissedComplexity()
           
 int getMaxMissedInstruction()
           
 int getMaxMissedLine()
           
 int getMaxMissedMethod()
           
 Coverage getMethodCoverage()
           
 CoverageObject getParent()
           
abstract  SELF getPreviousResult()
          Gets the corresponding coverage report object in the previous run that has the record.
 boolean hasClassCoverage()
           
 boolean hasLineCoverage()
           
 boolean isFailed()
           
 String printFourCoverageColumns()
          Used in the view to print out four table columns with the coverage info.
protected  void printRatioCell(boolean failed, Coverage ratio, StringBuilder buf)
           
protected  void printRatioTable(Coverage ratio, StringBuilder buf)
           
protected
<ReportLevel extends AggregatedReport>
void
setAllCovTypes(ReportLevel reportToSet, org.jacoco.core.analysis.ICoverageNode covReport)
           
<ReportLevel extends AggregatedReport>
void
setCoverage(ReportLevel reportToSet, org.jacoco.core.analysis.ICoverageNode covReport)
           
 void setFailed()
          Marks this coverage object as failed.
 void setMaxCoveredBranch(int maxBranch)
           
 void setMaxCoveredClazz(int maxClazz)
           
 void setMaxCoveredComplexity(int maxComplexity)
           
 void setMaxCoveredInstruction(int maxInstruction)
           
 void setMaxCoveredLine(int maxLine)
           
 void setMaxCoveredMethod(int maxMethod)
           
 void setMaxMissedBranch(int maxMissedBranch)
           
 void setMaxMissedClazz(int maxMissedClazz)
           
 void setMaxMissedComplexity(int maxMissedComplexity)
           
 void setMaxMissedInstruction(int maxMissedInstruction)
           
 void setMaxMissedLine(int maxMissedLine)
           
 void setMaxMissedMethod(int maxMissedMethod)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clazz

public Coverage clazz

method

public Coverage method

line

public Coverage line

complexity

public Coverage complexity

instruction

public Coverage instruction

branch

public Coverage branch

maxCoveredClazz

public int maxCoveredClazz
Variables used to store which child has to highest coverage for each coverage type.


maxCoveredMethod

public int maxCoveredMethod

maxCoveredLine

public int maxCoveredLine

maxCoveredComplexity

public int maxCoveredComplexity

maxCoveredInstruction

public int maxCoveredInstruction

maxCoveredBranch

public int maxCoveredBranch

maxMissedClazz

public int maxMissedClazz

maxMissedMethod

public int maxMissedMethod

maxMissedLine

public int maxMissedLine

maxMissedComplexity

public int maxMissedComplexity

maxMissedInstruction

public int maxMissedInstruction

maxMissedBranch

public int maxMissedBranch

maxClazz

@Deprecated
public transient int maxClazz
Deprecated. 

maxMethod

@Deprecated
public transient int maxMethod
Deprecated. 

maxLine

@Deprecated
public transient int maxLine
Deprecated. 

maxComplexity

@Deprecated
public transient int maxComplexity
Deprecated. 

maxInstruction

@Deprecated
public transient int maxInstruction
Deprecated. 

maxBranch

@Deprecated
public transient int maxBranch
Deprecated. 
Constructor Detail

CoverageObject

public CoverageObject()
Method Detail

getMaxCoveredClazz

public int getMaxCoveredClazz()

setMaxCoveredClazz

public void setMaxCoveredClazz(int maxClazz)

getMaxCoveredMethod

public int getMaxCoveredMethod()

setMaxCoveredMethod

public void setMaxCoveredMethod(int maxMethod)

getMaxCoveredLine

public int getMaxCoveredLine()

setMaxCoveredLine

public void setMaxCoveredLine(int maxLine)

getMaxCoveredComplexity

public int getMaxCoveredComplexity()

setMaxCoveredComplexity

public void setMaxCoveredComplexity(int maxComplexity)

getMaxCoveredInstruction

public int getMaxCoveredInstruction()

setMaxCoveredInstruction

public void setMaxCoveredInstruction(int maxInstruction)

getMaxCoveredBranch

public int getMaxCoveredBranch()

setMaxCoveredBranch

public void setMaxCoveredBranch(int maxBranch)

getMaxMissedClazz

public int getMaxMissedClazz()

setMaxMissedClazz

public void setMaxMissedClazz(int maxMissedClazz)

getMaxMissedMethod

public int getMaxMissedMethod()

setMaxMissedMethod

public void setMaxMissedMethod(int maxMissedMethod)

getMaxMissedLine

public int getMaxMissedLine()

setMaxMissedLine

public void setMaxMissedLine(int maxMissedLine)

getMaxMissedComplexity

public int getMaxMissedComplexity()

setMaxMissedComplexity

public void setMaxMissedComplexity(int maxMissedComplexity)

getMaxMissedInstruction

public int getMaxMissedInstruction()

setMaxMissedInstruction

public void setMaxMissedInstruction(int maxMissedInstruction)

getMaxMissedBranch

public int getMaxMissedBranch()

setMaxMissedBranch

public void setMaxMissedBranch(int maxMissedBranch)

isFailed

public boolean isFailed()

setFailed

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

See Also:
Rule

getClassCoverage

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

getMethodCoverage

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

getComplexityScore

@Exported(inline=true)
public Coverage getComplexityScore()

getInstructionCoverage

@Exported(inline=true)
public Coverage getInstructionCoverage()

getBranchCoverage

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

getLineCoverage

@Exported(inline=true)
public Coverage getLineCoverage()
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.

getParent

public CoverageObject getParent()

printFourCoverageColumns

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


hasLineCoverage

public boolean hasLineCoverage()

hasClassCoverage

public boolean hasClassCoverage()

printRatioCell

protected void printRatioCell(boolean failed,
                              Coverage ratio,
                              StringBuilder buf)

printRatioTable

protected void printRatioTable(Coverage ratio,
                               StringBuilder buf)

setAllCovTypes

protected <ReportLevel extends AggregatedReport> void setAllCovTypes(ReportLevel reportToSet,
                                                                     org.jacoco.core.analysis.ICoverageNode covReport)

setCoverage

public <ReportLevel extends AggregatedReport> void setCoverage(ReportLevel reportToSet,
                                                               org.jacoco.core.analysis.ICoverageNode covReport)

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2013 Hudson. All Rights Reserved.