Cobertura example source code file (CoverageDataContainer.java)
This example Cobertura source code file (CoverageDataContainer.java) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Cobertura CoverageDataContainer.java source code
/*
* Cobertura - http://cobertura.sourceforge.net/
*
* Copyright (C) 2003 jcoverage ltd.
* Copyright (C) 2005 Mark Doliner
* Copyright (C) 2005 Jeremy Thomerson
* Copyright (C) 2005 Mark Sinke
*
* Cobertura is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* Cobertura is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Cobertura; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
package net.sourceforge.cobertura.coveragedata;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* <p>
* Coverage data information is typically serialized to a file.
* </p>
*
* <p>
* 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.
* </p>
*/
public abstract class CoverageDataContainer
implements CoverageData, HasBeenInstrumented, Serializable
{
private static final long serialVersionUID = 2;
protected transient Lock lock;
/**
* Each key is the name of a child, usually stored as a String or
* an Integer object. Each value is information about the child,
* stored as an object that implements the CoverageData interface.
*/
Map<Object,CoverageData> children = new HashMap
Other Cobertura examples (source code examples)
Here is a short list of links related to this Cobertura CoverageDataContainer.java source code file: