net.sourceforge.cobertura.coveragedata
Class TouchCollector

java.lang.Object
  extended by net.sourceforge.cobertura.coveragedata.TouchCollector
All Implemented Interfaces:
HasBeenInstrumented

public class TouchCollector
extends java.lang.Object
implements HasBeenInstrumented


Nested Class Summary
private static class TouchCollector.JumpTouchData
           
private static class TouchCollector.LineTouchData
           
private static class TouchCollector.SwitchTouchData
           
 
Field Summary
private static java.util.Map<java.lang.String,java.lang.Integer> class2classId
           
private static java.util.Map<java.lang.Integer,java.lang.String> classId2class
           
private static CounterMap<TouchCollector.JumpTouchData> jumpTouchData
           
private static java.util.concurrent.atomic.AtomicInteger lastClassId
           
private static CounterMap<TouchCollector.SwitchTouchData> switchTouchData
           
private static CounterMap<TouchCollector.LineTouchData> touchedLines
           
 
Constructor Summary
TouchCollector()
           
 
Method Summary
static void applyTouchesOnProjectData(ProjectData projectData)
           
private static ClassData getClassFor(TouchCollector.LineTouchData key, ProjectData projectData)
           
private static int registerClassData(java.lang.String name)
           
static void touch(java.lang.String classId, int lineNumber)
          This method is only called by code that has been instrumented.
static void touchJump(java.lang.String classId, int lineNumber, int branchNumber, boolean branch)
          This method is only called by code that has been instrumented.
static void touchSwitch(java.lang.String classId, int lineNumber, int switchNumber, int branch)
          This method is only called by code that has been instrumented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

touchedLines

private static final CounterMap<TouchCollector.LineTouchData> touchedLines

switchTouchData

private static final CounterMap<TouchCollector.SwitchTouchData> switchTouchData

jumpTouchData

private static final CounterMap<TouchCollector.JumpTouchData> jumpTouchData

lastClassId

private static java.util.concurrent.atomic.AtomicInteger lastClassId

class2classId

private static final java.util.Map<java.lang.String,java.lang.Integer> class2classId

classId2class

private static final java.util.Map<java.lang.Integer,java.lang.String> classId2class
Constructor Detail

TouchCollector

public TouchCollector()
Method Detail

registerClassData

private static final int registerClassData(java.lang.String name)

touchSwitch

public static final void touchSwitch(java.lang.String classId,
                                     int lineNumber,
                                     int switchNumber,
                                     int branch)
This method is only called by code that has been instrumented. It is not called by any of the Cobertura code or ant tasks.


touch

public static final void touch(java.lang.String classId,
                               int lineNumber)
This method is only called by code that has been instrumented. It is not called by any of the Cobertura code or ant tasks.


touchJump

public static final void touchJump(java.lang.String classId,
                                   int lineNumber,
                                   int branchNumber,
                                   boolean branch)
This method is only called by code that has been instrumented. It is not called by any of the Cobertura code or ant tasks.


applyTouchesOnProjectData

public static void applyTouchesOnProjectData(ProjectData projectData)

getClassFor

private static ClassData getClassFor(TouchCollector.LineTouchData key,
                                     ProjectData projectData)