net.sourceforge.cobertura.coveragedata
Class JumpData
java.lang.Object
net.sourceforge.cobertura.coveragedata.JumpData
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable, BranchCoverageData, HasBeenInstrumented
public class JumpData
- extends java.lang.Object
- implements BranchCoverageData, java.lang.Comparable, java.io.Serializable, HasBeenInstrumented
This class implements HasBeenInstrumented so that when cobertura instruments
itself, it will omit this class. It does this to avoid an infinite recursion
problem because instrumented classes make use of this class.
- See Also:
- Serialized Form
Constructor Summary |
JumpData(int conditionNumber)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
lock
protected transient java.util.concurrent.locks.Lock lock
conditionNumber
private int conditionNumber
trueHits
private long trueHits
falseHits
private long falseHits
JumpData
JumpData(int conditionNumber)
initLock
private void initLock()
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable
touchBranch
void touchBranch(boolean branch)
getConditionNumber
public int getConditionNumber()
getTrueHits
public long getTrueHits()
getFalseHits
public long getFalseHits()
getBranchCoverageRate
public double getBranchCoverageRate()
- Specified by:
getBranchCoverageRate
in interface BranchCoverageData
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getNumberOfCoveredBranches
public int getNumberOfCoveredBranches()
- Specified by:
getNumberOfCoveredBranches
in interface BranchCoverageData
getNumberOfValidBranches
public int getNumberOfValidBranches()
- Specified by:
getNumberOfValidBranches
in interface BranchCoverageData
merge
public void merge(BranchCoverageData coverageData)
- Description copied from interface:
BranchCoverageData
- Warning: This is generally implemented as a
"shallow" merge. For our current use, this
should be fine, but in the future it may make
sense to modify the merge methods of the
various classes to do a deep copy of the
appropriate objects.
- Specified by:
merge
in interface BranchCoverageData
getBothLocks
private void getBothLocks(JumpData other)
readObject
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException