net.sourceforge.cobertura.ant
Class CheckTask

java.lang.Object
  extended by MatchingTask
      extended by net.sourceforge.cobertura.ant.CheckTask

public class CheckTask
extends MatchingTask

An ant task that can be used to optionally fail an ant build if the coverage percentage for lines or branches is below a certain, user specifiable threshold.


Field Summary
private  java.lang.String branchRate
           
private  java.lang.String dataFile
           
private  java.lang.String failureProperty
           
private  boolean haltOnFailure
           
private  Java java
           
private  java.lang.String lineRate
           
private  java.lang.String packageBranchRate
           
private  java.lang.String packageLineRate
           
(package private)  java.util.Set regexes
           
private  java.lang.String totalBranchRate
           
private  java.lang.String totalLineRate
           
 
Constructor Summary
CheckTask()
           
 
Method Summary
 Path createClasspath()
           
 Regex createRegex()
           
 void execute()
           
protected  Java getJava()
           
 void setBranchRate(java.lang.String branchRate)
           
 void setClasspath(Path classpath)
           
 void setClasspathRef(Reference r)
           
 void setDataFile(java.lang.String dataFile)
           
 void setFailureProperty(java.lang.String failureProperty)
           
 void setHaltOnFailure(boolean haltOnFailure)
           
 void setLineRate(java.lang.String lineRate)
           
 void setPackageBranchRate(java.lang.String packageBranchRate)
           
 void setPackageLineRate(java.lang.String packageLineRate)
           
 void setTotalBranchRate(java.lang.String totalBranchRate)
           
 void setTotalLineRate(java.lang.String totalLineRate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataFile

private java.lang.String dataFile

regexes

final java.util.Set regexes

branchRate

private java.lang.String branchRate

lineRate

private java.lang.String lineRate

packageBranchRate

private java.lang.String packageBranchRate

packageLineRate

private java.lang.String packageLineRate

totalBranchRate

private java.lang.String totalBranchRate

totalLineRate

private java.lang.String totalLineRate

failureProperty

private java.lang.String failureProperty

haltOnFailure

private boolean haltOnFailure

java

private Java java
Constructor Detail

CheckTask

public CheckTask()
Method Detail

execute

public void execute()
             throws BuildException
Throws:
BuildException

createRegex

public Regex createRegex()

getJava

protected Java getJava()

createClasspath

public Path createClasspath()

setClasspath

public void setClasspath(Path classpath)

setClasspathRef

public void setClasspathRef(Reference r)

setDataFile

public void setDataFile(java.lang.String dataFile)

setBranchRate

public void setBranchRate(java.lang.String branchRate)

setLineRate

public void setLineRate(java.lang.String lineRate)

setPackageBranchRate

public void setPackageBranchRate(java.lang.String packageBranchRate)

setPackageLineRate

public void setPackageLineRate(java.lang.String packageLineRate)

setTotalBranchRate

public void setTotalBranchRate(java.lang.String totalBranchRate)

setTotalLineRate

public void setTotalLineRate(java.lang.String totalLineRate)

setFailureProperty

public void setFailureProperty(java.lang.String failureProperty)

setHaltOnFailure

public void setHaltOnFailure(boolean haltOnFailure)