eu.lindenbaum.maven.cover
Class FunctionCoverData

java.lang.Object
  extended by eu.lindenbaum.maven.cover.FunctionCoverData

public final class FunctionCoverData
extends Object

Represents the test coverage information for some function.

Author:
Olle Törnström

Constructor Summary
FunctionCoverData(String functionName)
          Constructor from a function name.
FunctionCoverData(String functionName, CoverUnit totalCoverData)
          Constructor from a function name and a total cover unit.
 
Method Summary
 Map<Integer,CoverUnit> getClauseCoverData()
          Get the clause cover data.
 int getCoveredLines()
           
 String getFunctionName()
           
 int getNotCoveredLines()
           
 int getNumberOfClauses()
           
 CoverUnit getTotalCoverData()
          Get the total cover data, computing it if required.
 boolean isCovered()
           
 void putClauseData(Integer inClauseIndex, CoverUnit inData)
          Append clause data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionCoverData

public FunctionCoverData(String functionName,
                         CoverUnit totalCoverData)
Constructor from a function name and a total cover unit.

Parameters:
functionName - function identifier (name/arity).
totalCoverData - coverage data for the whole function.

FunctionCoverData

public FunctionCoverData(String functionName)
Constructor from a function name. Total cover data will be computed later.

Parameters:
functionName - function identifier (name/arity).
Method Detail

getFunctionName

public String getFunctionName()

putClauseData

public void putClauseData(Integer inClauseIndex,
                          CoverUnit inData)
Append clause data.

Parameters:
inClauseIndex - index of the clause.
inData - coverage data for the clause.

getTotalCoverData

public CoverUnit getTotalCoverData()
Get the total cover data, computing it if required.

Returns:
the total data, i.e. the coverage for the function as a whole.

getClauseCoverData

public Map<Integer,CoverUnit> getClauseCoverData()
Get the clause cover data.

Returns:
a map with clause indexes as the keys and coverage data for the clauses as the values.

getNumberOfClauses

public int getNumberOfClauses()

getCoveredLines

public int getCoveredLines()

getNotCoveredLines

public int getNotCoveredLines()

isCovered

public boolean isCovered()


Copyright © 2010 Lindenbaum GmbH. All Rights Reserved.