|
|||||||||
| Home >> All >> org >> jxcl >> jxunit >> cover >> [ stmt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jxcl.jxunit.cover.stmt
Class StmtRegistry

java.lang.Objectorg.jxcl.reg.Registry
org.jxcl.reg.JXRegistry
org.jxcl.jxunit.cover.stmt.StmtRegistry
- public class StmtRegistry
- extends org.jxcl.reg.JXRegistry
Registry for statement coverage information. As JXunit-instrumented
classes are loaded, they register their z$$z hit count
arrays and are assigned an ID unique in the life of the registry.
The registry maintains:
- hit counts, keyed on class name
- method end counter indexes, keyed on class and method name
- line number ranges, keyed on class and counter index
This and other information in the registry allows it the generate a number of reports summarizing coverage at
- package level (soon)
- class level (now)
- method level (now)
- line level (soonish)
The registry is associated with the JXunit class loader when it is created. Information can been retrieved from the registry at any time. It will be accumulated as new instances of JXunit-instrumented classes are run.
| Nested Class Summary |
| Nested classes inherited from class org.jxcl.reg.Registry |
|
| Field Summary | |
private java.util.Map |
ephemera
Maps class name to temporary data structure |
private java.util.Map |
methodEnds
Maps class name to array of index of last counters for each method |
private java.util.Map |
methodNames
Maps class name to array of names of instrumented methods |
private static int |
nextClassID
|
| Fields inherited from class org.jxcl.reg.JXRegistry |
cxf, gxf, mxf, qcl_ |
| Fields inherited from class org.jxcl.reg.Registry |
|
| Constructor Summary | |
StmtRegistry(org.jxcl.cl.JXClassLoader jxcl)
Constructor specifying JXunit class loader the registry is associated with. |
|
| Method Summary | |
(package private) int |
getClassCoverage(java.lang.String className)
Get the percentage of counters in the class that have counts greater than zero. |
int |
getClassID(java.lang.String className)
|
int[] |
getCounts(java.lang.String className)
Get a reference to the hit count array for a class. |
(package private) Ephemera |
getEphemera(java.lang.String className)
get reference to temporary data for class |
int |
getJXunitVersion(java.lang.String className)
|
(package private) int |
getMethodCoverage(java.lang.String className,
int n)
Get the percentage of counters in the Nth method that have counts greater than zero. |
java.lang.String |
getReport()
Dump the registry as plain text. |
(package private) boolean |
putEphemera(java.lang.String className,
Ephemera eph)
add temporary data for class to registry |
int |
registerClass(java.lang.String name,
org.jxcl.JXIC 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)
|
(package private) Ephemera |
removeEphemera(java.lang.String className)
Remove the reference from the registry. |
void |
reset()
Clear counters associated with registry entries. |
| Methods inherited from class org.jxcl.reg.JXRegistry |
setTransformers |
| Methods inherited from class org.jxcl.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 |
| Field Detail |
methodNames
private java.util.Map methodNames
- Maps class name to array of names of instrumented methods
methodEnds
private java.util.Map methodEnds
- Maps class name to array of index of last counters for each method
nextClassID
private static int nextClassID
ephemera
private java.util.Map ephemera
- Maps class name to temporary data structure
| Constructor Detail |
StmtRegistry
public StmtRegistry(org.jxcl.cl.JXClassLoader jxcl)
- Constructor specifying JXunit class loader the registry is
associated with.
| Method Detail |
reset
public void reset()
- Clear counters associated with registry entries.
getReport
public java.lang.String getReport()
- Dump the registry as plain text.
getClassCoverage
int getClassCoverage(java.lang.String className)
- Get the percentage of counters in the class that have counts
greater than zero. The percentage is rounded down. If no
class information is found, returns zero.
getMethodCoverage
int getMethodCoverage(java.lang.String className, int n)
- Get the percentage of counters in the Nth method that have counts
greater than zero. The percentage is rounded down. If no
class or method information is found, returns zero.
XXX The 'methodEnds' array actually contains cumulative counts,
so values must be reduced by one.
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 z$$zID
XXX So far absolutely no value to using String array as key; could
just be String.
registerMethods
public void registerMethods(java.lang.String className, java.lang.String[] methods, int[] endCounts)
getJXunitVersion
public int getJXunitVersion(java.lang.String className)
getEphemera
Ephemera getEphemera(java.lang.String className)
- get reference to temporary data for class
putEphemera
boolean putEphemera(java.lang.String className, Ephemera eph)
- add temporary data for class to registry
removeEphemera
Ephemera removeEphemera(java.lang.String className)
- Remove the reference from the registry.
registerClass
public int registerClass(java.lang.String name, org.jxcl.JXIC junk)
- STUB
|
|||||||||
| Home >> All >> org >> jxcl >> jxunit >> cover >> [ stmt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC