net.sourceforge.groboutils.codecoverage.v2.module
Class BranchCountMeasure

java.lang.Object
  extended bynet.sourceforge.groboutils.codecoverage.v2.module.AbstractMeasure
      extended bynet.sourceforge.groboutils.codecoverage.v2.module.BranchCountMeasure
All Implemented Interfaces:
IAnalysisModule

public class BranchCountMeasure
extends AbstractMeasure

Processes methods for branch coverage analysis, where each branch instruction and its corresponding not-taken instruction are marked. Currently, this does not support localization.

This is more accurately called "Object Code Branch Coverage", since true branch coverage requires the originating source code to correctly discover the branches.

This measure can be superior to line coverage due to the Java construct of the ?: operation. This hides a branch inside a single statement. Also, some developers may put an if statement and its one-line branch all on the same line, which will hide the branch that was taken.

Since:
January 26, 2003
Version:
$Date: 2004/04/15 05:48:26 $
Author:
Matt Albrecht groboclown@users.sourceforge.net, Juergen Kindler jkindler@freenet.de
See Also:
IAnalysisMetaData

Constructor Summary
BranchCountMeasure()
           
 
Method Summary
 void analyze(IMethodCode method)
          Perform the analysis on the method.
 java.lang.String getMeasureName()
          Returns the human-readable name of the measure.
 java.lang.String getMeasureUnit()
          Returns the unit name for this particular coverage measure.
 java.lang.String getMimeEncoding()
          Returns the text format used in meta-data formatted text.
 
Methods inherited from class net.sourceforge.groboutils.codecoverage.v2.module.AbstractMeasure
markInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BranchCountMeasure

public BranchCountMeasure()
Method Detail

getMeasureName

public java.lang.String getMeasureName()
Returns the human-readable name of the measure.


getMeasureUnit

public java.lang.String getMeasureUnit()
Returns the unit name for this particular coverage measure.


getMimeEncoding

public java.lang.String getMimeEncoding()
Returns the text format used in meta-data formatted text. This should be the mime encoding type, such as "text/plain" or "text/html".


analyze

public void analyze(IMethodCode method)
Perform the analysis on the method.



Copyright © 2001-2003 by The GroboUtils Project