com.cakupan.xslt.data
Class CoverageIndex

java.lang.Object
  extended by com.cakupan.xslt.data.CoverageIndex

public class CoverageIndex
extends java.lang.Object

The CoverageIndex maintains a random access file that contains an index of all lines and their counts. No need for dumpCoverageStats() after each trace operation.


Constructor Summary
CoverageIndex(java.io.File indexFile)
           
 
Method Summary
static CoverageIndex get(java.lang.String key)
           
 int getLineCount(int lineNumber)
           
static void init(java.lang.String key, int lineNumber, int count)
           
static void load(java.util.Map<java.lang.String,CoverageFile> coverageMap)
           
static void removeIndexes(java.util.Collection<java.lang.String> keys)
           
 void setLineCount(int lineNumber, int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoverageIndex

public CoverageIndex(java.io.File indexFile)
              throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

getLineCount

public int getLineCount(int lineNumber)

setLineCount

public void setLineCount(int lineNumber,
                         int count)

init

public static void init(java.lang.String key,
                        int lineNumber,
                        int count)
                 throws XSLTCoverageException
Throws:
XSLTCoverageException

load

public static void load(java.util.Map<java.lang.String,CoverageFile> coverageMap)
                 throws XSLTCoverageException
Throws:
XSLTCoverageException

get

public static CoverageIndex get(java.lang.String key)

removeIndexes

public static void removeIndexes(java.util.Collection<java.lang.String> keys)
                          throws XSLTCoverageException
Throws:
XSLTCoverageException