|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cobertura.coveragedata.CoverageDataContainer
public abstract class CoverageDataContainer
Coverage data information is typically serialized to a file.
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.
Field Summary | |
---|---|
(package private) java.util.Map<java.lang.Object,CoverageData> |
children
Each key is the name of a child, usually stored as a String or an Integer object. |
protected java.util.concurrent.locks.Lock |
lock
|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
CoverageDataContainer()
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Determine if this CoverageDataContainer is equal to another one. |
protected void |
getBothLocks(CoverageDataContainer other)
|
double |
getBranchCoverageRate()
|
CoverageData |
getChild(java.lang.String name)
Get a child from this container with the specified key. |
double |
getLineCoverageRate()
|
int |
getNumberOfChildren()
|
int |
getNumberOfCoveredBranches()
|
int |
getNumberOfCoveredLines()
|
int |
getNumberOfValidBranches()
|
int |
getNumberOfValidLines()
|
int |
hashCode()
It is highly recommended that classes extending this class override this hashCode method and generate a more effective hash code. |
private void |
initLock()
|
void |
merge(CoverageData coverageData)
Merge two CoverageDataContainer s. |
private void |
readObject(java.io.ObjectInputStream in)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected transient java.util.concurrent.locks.Lock lock
java.util.Map<java.lang.Object,CoverageData> children
Constructor Detail |
---|
public CoverageDataContainer()
Method Detail |
---|
private void initLock()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- An object to test for equality.
public double getBranchCoverageRate()
getBranchCoverageRate
in interface CoverageData
public CoverageData getChild(java.lang.String name)
name
- The key used to lookup the child in the
map.
public double getLineCoverageRate()
getLineCoverageRate
in interface CoverageData
public int getNumberOfChildren()
public int getNumberOfCoveredBranches()
getNumberOfCoveredBranches
in interface CoverageData
public int getNumberOfCoveredLines()
getNumberOfCoveredLines
in interface CoverageData
public int getNumberOfValidBranches()
getNumberOfValidBranches
in interface CoverageData
public int getNumberOfValidLines()
getNumberOfValidLines
in interface CoverageData
public int hashCode()
hashCode
in class java.lang.Object
public void merge(CoverageData coverageData)
CoverageDataContainer
s.
merge
in interface CoverageData
coverageData
- The container to merge into this one.protected void getBothLocks(CoverageDataContainer other)
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |