org.hansel
Class ProbeTable
java.lang.Object
junit.framework.TestSuite
org.hansel.ProbeTable
- All Implemented Interfaces:
- junit.framework.Test
public class ProbeTable
- extends junit.framework.TestSuite
This class contains a table of currently active Probes.
It implements the singleton pattern.
- Author:
- Niklas Mehner
Method Summary |
int |
addProbe(Probe probe)
|
void |
addProbeDescriptions(org.junit.runner.Description coverageDesc)
|
void |
clear()
|
Probe |
getCached(ProbeData pd)
|
int |
getCovered()
|
int |
getProbeIndex()
Returns the index for the next probe. |
static ProbeTable |
getProbeTable()
Returns the singleton instance of the ProbeTable. |
int |
getSize()
|
void |
hit(int index)
|
void |
hit(int value,
int index)
|
void |
hit(int n,
int m,
int index)
|
void |
hit(java.lang.Object obj,
int index)
|
void |
hit(java.lang.Object obj1,
java.lang.Object obj2,
int index)
|
void |
hitB(int condition,
int index)
|
static void |
hitBranch(int condition,
int index)
|
static void |
hitBranch(int n,
int m,
int index)
|
static void |
hitBranch(java.lang.Object obj,
int index)
|
static void |
hitBranch(java.lang.Object obj1,
java.lang.Object obj2,
int index)
|
static void |
hitMethod(int index)
This is the method inserted by the instrumentation, to
record execution of a given probe. |
static void |
hitSelect(int value,
int index)
|
void |
run(org.junit.runner.notification.RunNotifier result,
org.junit.runner.Description coverageDescription,
boolean hasErrors)
|
void |
run(junit.framework.TestResult result)
|
void |
setDisplayStatistics(boolean display)
|
static void |
setProbeTable(ProbeTable pt)
|
Methods inherited from class junit.framework.TestSuite |
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, runTest, setName, testAt, testCount, tests, toString, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ProbeTable
public ProbeTable(ProbeFilter probeFilter)
setDisplayStatistics
public void setDisplayStatistics(boolean display)
addProbe
public int addProbe(Probe probe)
getCached
public Probe getCached(ProbeData pd)
hit
public void hit(int index)
hitMethod
public static void hitMethod(int index)
- This is the method inserted by the instrumentation, to
record execution of a given probe.
- Parameters:
index
- Index of the probe.
hitB
public void hitB(int condition,
int index)
hitBranch
public static void hitBranch(int condition,
int index)
hit
public void hit(int n,
int m,
int index)
hitBranch
public static void hitBranch(int n,
int m,
int index)
hit
public void hit(java.lang.Object obj1,
java.lang.Object obj2,
int index)
hitBranch
public static void hitBranch(java.lang.Object obj1,
java.lang.Object obj2,
int index)
hit
public void hit(java.lang.Object obj,
int index)
hitBranch
public static void hitBranch(java.lang.Object obj,
int index)
hit
public void hit(int value,
int index)
hitSelect
public static void hitSelect(int value,
int index)
getProbeIndex
public int getProbeIndex()
- Returns the index for the next probe. The index of a probe has to be
unique, because it is used to identify the probe, when a call to
ProbeTable.hit(index) is made by the instrumented code.
- Returns:
- Index for the next probe.
run
public void run(junit.framework.TestResult result)
- Specified by:
run
in interface junit.framework.Test
- Overrides:
run
in class junit.framework.TestSuite
addProbeDescriptions
public void addProbeDescriptions(org.junit.runner.Description coverageDesc)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
run
public void run(org.junit.runner.notification.RunNotifier result,
org.junit.runner.Description coverageDescription,
boolean hasErrors)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
setProbeTable
public static void setProbeTable(ProbeTable pt)
getProbeTable
public static ProbeTable getProbeTable()
- Returns the singleton instance of the ProbeTable.
- Returns:
- ProbeTable.
clear
public void clear()
getSize
public int getSize()
getCovered
public int getCovered()