org.jacoco.core.analysis
Class MethodCoverage

java.lang.Object
  extended by org.jacoco.core.analysis.CoverageNodeImpl
      extended by org.jacoco.core.analysis.MethodCoverage
All Implemented Interfaces:
ICoverageNode

public class MethodCoverage
extends CoverageNodeImpl

Coverage data of a single method.

Version:
$Revision: $
Author:
Marc R. Hoffmann

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jacoco.core.analysis.ICoverageNode
ICoverageNode.CounterEntity, ICoverageNode.ElementType
 
Field Summary
 
Fields inherited from class org.jacoco.core.analysis.CoverageNodeImpl
blockCounter, classCounter, instructionCounter, lineCounter, lines, methodCounter
 
Constructor Summary
MethodCoverage(String name, String desc, String signature)
          Creates a method coverage data object with the given parameters.
 
Method Summary
 void addBlock(int instructions, int[] lines, boolean covered)
          Adds the given block to this method.
 String getDesc()
          Returns the parameter description of the method.
 String getSignature()
          Returns the generic signature of the method if defined.
 
Methods inherited from class org.jacoco.core.analysis.CoverageNodeImpl
getBlockCounter, getClassCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getLines, getMethodCounter, getName, getPlainCopy, increment, increment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodCoverage

public MethodCoverage(String name,
                      String desc,
                      String signature)
Creates a method coverage data object with the given parameters.

Parameters:
name - name of the method
desc - parameter description
signature - generic signature or null
Method Detail

addBlock

public void addBlock(int instructions,
                     int[] lines,
                     boolean covered)
Adds the given block to this method.

Parameters:
instructions - number of instructions of this block
lines - lines of this block
covered - true, if this block is covered

getDesc

public String getDesc()
Returns the parameter description of the method.

Returns:
parameter description

getSignature

public String getSignature()
Returns the generic signature of the method if defined.

Returns:
generic signature or null