eu.lindenbaum.maven.cover
Class ModuleCoverData

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

public final class ModuleCoverData
extends Object

Represents the test coverage information for a single module.

Author:
Olle Törnström

Constructor Summary
ModuleCoverData(String moduleName)
          Constructor from a name.
 
Method Summary
 void calculateStatistics()
           
 Collection<FunctionCoverData> getFunctionCoverData()
          Get the coverage data for all functions.
 FunctionCoverData getFunctionCoverData(String inFunction)
          Get the coverage data for a given function.
 Map<Integer,List<CoverUnit>> getLineCoverData()
          Get the coverage data for all lines.
 List<CoverUnit> getLineCoverData(Integer inLine)
          Get the coverage data for a given line.
 String getModuleName()
          Return the name of the module.
 int getNumberOfClauses()
           
 int getNumberOfCoveredLines()
           
 int getNumberOfFunctions()
           
 int getNumberOfLines()
           
 int getNumberOfNotCoveredLines()
           
 boolean isCovered()
           
 void putFunctionCoverData(String inFunction, CoverUnit inUnit)
          Fill the module cover data with function data.
 void putFunctionCoverData(String inFunction, FunctionCoverData inCoverData)
          Fill the module cover data with function data.
 void putLineCoverData(Integer inLine, List<CoverUnit> inCoverData)
          Fill the module cover data with line data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleCoverData

public ModuleCoverData(String moduleName)
Constructor from a name.

Parameters:
moduleName - name of the module.
Method Detail

calculateStatistics

public void calculateStatistics()

putFunctionCoverData

public void putFunctionCoverData(String inFunction,
                                 CoverUnit inUnit)
Fill the module cover data with function data.

Parameters:
inFunction - identifier of the function (name/arity).
inUnit - cover data for the function.

putFunctionCoverData

public void putFunctionCoverData(String inFunction,
                                 FunctionCoverData inCoverData)
Fill the module cover data with function data.

Parameters:
inFunction - identifier for the function (name/arity).
inCoverData - cover data for the function.

getFunctionCoverData

public FunctionCoverData getFunctionCoverData(String inFunction)
Get the coverage data for a given function.

Parameters:
inFunction - identifier for the function (name/arity).
Returns:
the cover data for the function.

getFunctionCoverData

public Collection<FunctionCoverData> getFunctionCoverData()
Get the coverage data for all functions.

Returns:
the set of the cover data for all functions.

putLineCoverData

public void putLineCoverData(Integer inLine,
                             List<CoverUnit> inCoverData)
Fill the module cover data with line data.

Parameters:
inLine - line considered.
inCoverData - cover data for the line.

getLineCoverData

public List<CoverUnit> getLineCoverData(Integer inLine)
Get the coverage data for a given line.

Parameters:
inLine - line considered.
Returns:
the list of cover data units for this line.

getLineCoverData

public Map<Integer,List<CoverUnit>> getLineCoverData()
Get the coverage data for all lines.

Returns:
a map with line numbers as keys and list of cover data as values.

getModuleName

public String getModuleName()
Return the name of the module.

Returns:
the name of the module.

getNumberOfFunctions

public int getNumberOfFunctions()

getNumberOfClauses

public int getNumberOfClauses()

getNumberOfLines

public int getNumberOfLines()

isCovered

public boolean isCovered()

getNumberOfCoveredLines

public int getNumberOfCoveredLines()

getNumberOfNotCoveredLines

public int getNumberOfNotCoveredLines()


Copyright © 2010 Lindenbaum GmbH. All Rights Reserved.