org.hansel
Class Probe

java.lang.Object
  extended by org.hansel.Probe
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
BranchProbe, MethodProbe, SelectProbe

public abstract class Probe
extends java.lang.Object
implements junit.framework.Test

Abstract super class of all probes.

Author:
Niklas Mehner.

Field Summary
static java.lang.String HIT_CLASS
           
 
Constructor Summary
Probe(ProbeData pd)
          Create a new Probe.
 
Method Summary
 void addResult(junit.framework.Test test, junit.framework.TestResult result)
           
 int countTestCases()
           
abstract  boolean coverageFailure()
           
abstract  boolean displayFailure()
           
 boolean equals(java.lang.Object o)
           
 org.junit.runner.Description getDescription()
           
abstract  java.lang.String getFailureMessage()
           
 int getID()
           
 java.lang.String getName()
           
 ProbeData getProbeData()
           
 int hashCode()
           
abstract  void insertProbeCode(org.objectweb.asm.MethodVisitor cv)
          Returns the code of the probe.
 void run(org.junit.runner.notification.RunNotifier result, org.junit.runner.Description coverageDescription)
           
 void run(junit.framework.TestResult result)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HIT_CLASS

public static final java.lang.String HIT_CLASS
Constructor Detail

Probe

public Probe(ProbeData pd)
Create a new Probe.

Parameters:
pd - Data for this probe.
Method Detail

getFailureMessage

public abstract java.lang.String getFailureMessage()

displayFailure

public abstract boolean displayFailure()

coverageFailure

public abstract boolean coverageFailure()

insertProbeCode

public abstract void insertProbeCode(org.objectweb.asm.MethodVisitor cv)
Returns the code of the probe.

Parameters:
cp - ConstantPool all names of methods etc. have to be inserted.

getProbeData

public ProbeData getProbeData()

getID

public int getID()

addResult

public void addResult(junit.framework.Test test,
                      junit.framework.TestResult result)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

countTestCases

public int countTestCases()
Specified by:
countTestCases in interface junit.framework.Test

run

public void run(junit.framework.TestResult result)
Specified by:
run in interface junit.framework.Test

run

public void run(org.junit.runner.notification.RunNotifier result,
                org.junit.runner.Description coverageDescription)
         throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

getName

public java.lang.String getName()

getDescription

public org.junit.runner.Description getDescription()
                                            throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException