org.quilt.cover.stmt
Class StmtRegistry

java.lang.Object
  |
  +--org.quilt.reg.Registry
        |
        +--org.quilt.reg.QuiltRegistry
              |
              +--org.quilt.cover.stmt.StmtRegistry

public class StmtRegistry
extends QuiltRegistry

Registry for statement coverage information. As Quilt-instrumented classes are loaded, they register their q$$q hit count arrays and are assigned an ID unique in the life of the registry. The registry maintains:

This and other information in the registry allows it the generate a number of reports summarizing coverage at

The registry is associated with the Quilt class loader when it is created. Information can been retrieved from the registry at any time. It will be accumulated as new instances of Quilt-instrumented classes are run.

Author:
Jim Dixon

Field Summary
 
Fields inherited from class org.quilt.reg.QuiltRegistry
cxf, gxf, mxf, qcl_
 
Constructor Summary
StmtRegistry(QuiltClassLoader qcl)
          Constructor specifying Quilt class loader the registry is associated with.
 
Method Summary
 int getClassID(java.lang.String className)
           
 int[] getCounts(java.lang.String className)
          Get a reference to the hit count array for a class.
static StmtRegistry getInstance()
          Returns a reference to the latest instance to announce itself.
 int getQuiltVersion(java.lang.String className)
           
 java.lang.String getReport()
          Dump the registry as plain text.
 int registerClass(java.lang.String name, org.quilt.cover.stmt.QIC junk)
          STUB
 int registerCounts(java.lang.String className, int[] counts)
          Register a class by passing a reference to its integer hit count array.
 void registerMethods(java.lang.String className, java.lang.String[] methods, int[] endCounts)
           
 void reset()
          Clear counters associated with registry entries.
 
Methods inherited from class org.quilt.reg.QuiltRegistry
setTransformers
 
Methods inherited from class org.quilt.reg.Registry
clear, containsKey, get, isEmpty, keySet, put, remove, size, splitClassName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StmtRegistry

public StmtRegistry(QuiltClassLoader qcl)
Constructor specifying Quilt class loader the registry is associated with.

Method Detail

getInstance

public static StmtRegistry getInstance()
Returns a reference to the latest instance to announce itself.


reset

public void reset()
Clear counters associated with registry entries.

Specified by:
reset in class QuiltRegistry

getReport

public java.lang.String getReport()
Dump the registry as plain text.

Specified by:
getReport in class QuiltRegistry

getClassID

public int getClassID(java.lang.String className)

getCounts

public int[] getCounts(java.lang.String className)
Get a reference to the hit count array for a class.


registerCounts

public int registerCounts(java.lang.String className,
                          int[] counts)
Register a class by passing a reference to its integer hit count array. Returns a class ID which is unique within this run. The ID will be stored in a static in the class, public static int q$$qID XXX So far absolutely no value to using String array as key; could just be String.

Parameters:
className - Name of the class being registered.
counts - Reference to the class's public static hit count array.
Returns:
A unique class ID on success, -1 on failure.

registerMethods

public void registerMethods(java.lang.String className,
                            java.lang.String[] methods,
                            int[] endCounts)

getQuiltVersion

public int getQuiltVersion(java.lang.String className)

registerClass

public int registerClass(java.lang.String name,
                         org.quilt.cover.stmt.QIC junk)
STUB



Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.