com.jcoverage.coverage
Class ConditionalImpl

java.lang.Object
  extended bycom.jcoverage.coverage.ConditionalImpl
All Implemented Interfaces:
Conditional, HasBeenInstrumented, java.io.Serializable

class ConditionalImpl
extends java.lang.Object
implements Conditional, HasBeenInstrumented

A conditional records the position of a conditional branch instruction, and the position of the branch target. Conditionals are used internally by the instrumentation to determine branch coverage.


Field Summary
(package private)  int lineNumber
           
(package private)  int targetLineNumber
           
 
Constructor Summary
(package private) ConditionalImpl()
           
(package private) ConditionalImpl(int lineNumber, int targetLineNumber)
           
 
Method Summary
 int getLineNumber()
          The line number of this conditional branch.
 int getTargetLineNumber()
          The target line number of this conditional branch.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lineNumber

int lineNumber

targetLineNumber

int targetLineNumber
Constructor Detail

ConditionalImpl

ConditionalImpl()

ConditionalImpl

ConditionalImpl(int lineNumber,
                int targetLineNumber)
Method Detail

getLineNumber

public int getLineNumber()
Description copied from interface: Conditional
The line number of this conditional branch. (Actually, its the source line immediately after the conditional branch, so that instrumentation can determine whether the "fall-through" branch has been executed).

Specified by:
getLineNumber in interface Conditional

getTargetLineNumber

public int getTargetLineNumber()
Description copied from interface: Conditional
The target line number of this conditional branch.

Specified by:
getTargetLineNumber in interface Conditional

toString

public java.lang.String toString()