net.sourceforge.cobertura.coveragedata
Class ProjectData
java.lang.Object
net.sourceforge.cobertura.coveragedata.CoverageDataContainer
net.sourceforge.cobertura.coveragedata.ProjectData
- All Implemented Interfaces:
- CoverageData, HasBeenInstrumented, java.io.Serializable
- public class ProjectData
- extends CoverageDataContainer
- implements HasBeenInstrumented
- See Also:
- Serialized Form
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
globalProjectData
private static ProjectData globalProjectData
saveTimer
private static SaveTimer saveTimer
classes
private java.util.Map classes
- This collection is used for quicker access to the list of classes.
ProjectData
public ProjectData()
addClassData
public void addClassData(ClassData classData)
getClassData
public ClassData getClassData(java.lang.String name)
getOrCreateClassData
public ClassData getOrCreateClassData(java.lang.String name)
- This is called by instrumented bytecode.
getClasses
public java.util.Collection getClasses()
getNumberOfClasses
public int getNumberOfClasses()
getNumberOfSourceFiles
public int getNumberOfSourceFiles()
getPackages
public java.util.SortedSet getPackages()
getSourceFiles
public java.util.Collection getSourceFiles()
getSubPackages
public java.util.SortedSet getSubPackages(java.lang.String packageName)
- Get all subpackages of the given package. Includes also specified package if
it exists.
- Parameters:
packageName
- The package name to find subpackages for.
For example, "com.example"
- Returns:
- A collection containing PackageData objects. Each one
has a name beginning with the given packageName. For
example: "com.example.io", "com.example.io.internal"
merge
public void merge(CoverageData coverageData)
- Description copied from class:
CoverageDataContainer
- Merge two
CoverageDataContainer
s.
- Specified by:
merge
in interface CoverageData
- Overrides:
merge
in class CoverageDataContainer
- Parameters:
coverageData
- The container to merge into this one.
getGlobalProjectData
public static ProjectData getGlobalProjectData()
- Get a reference to a ProjectData object in order to increase the
coverage count for a specific line.
This method is only called by code that has been instrumented. It
is not called by any of the Cobertura code or ant tasks.
initialize
private static void initialize()
saveGlobalProjectData
public static void saveGlobalProjectData()
loadCoverageDataFromDatafile
private static ProjectData loadCoverageDataFromDatafile(java.io.File dataFile)