org.nasdanika.models.coverage.PackageCoverage Maven / Gradle / Ivy
/**
*/
package org.nasdanika.models.coverage;
import org.eclipse.emf.common.util.EList;
import org.jacoco.core.analysis.IClassCoverage;
import org.jacoco.core.analysis.IPackageCoverage;
import org.jacoco.core.analysis.ISourceFileCoverage;
/**
*
* A representation of the model object 'Package Coverage'.
*
*
*
* The following features are supported:
*
*
* - {@link org.nasdanika.models.coverage.PackageCoverage#getClasses Classes}
* - {@link org.nasdanika.models.coverage.PackageCoverage#getSourceFiles Source Files}
*
*
* @see org.nasdanika.models.coverage.CoveragePackage#getPackageCoverage()
* @model
* @generated
*/
public interface PackageCoverage extends Coverage {
/**
* Returns the value of the 'Classes' containment reference list.
* The list contents are of type {@link org.nasdanika.models.coverage.ClassCoverage}.
*
*
* @return the value of the 'Classes' containment reference list.
* @see org.nasdanika.models.coverage.CoveragePackage#getPackageCoverage_Classes()
* @model containment="true"
* @generated
*/
EList getClasses();
/**
* Returns the value of the 'Source Files' containment reference list.
* The list contents are of type {@link org.nasdanika.models.coverage.SourceFileCoverage}.
*
*
* @return the value of the 'Source Files' containment reference list.
* @see org.nasdanika.models.coverage.CoveragePackage#getPackageCoverage_SourceFiles()
* @model containment="true"
* @generated
*/
EList getSourceFiles();
default void load(IPackageCoverage data) {
Coverage.super.load(data);
EList classes = getClasses();
for (IClassCoverage ccData: data.getClasses()) {
ClassCoverage cc = CoverageFactory.eINSTANCE.createClassCoverage();
cc.load(ccData);
classes.add(cc);
}
EList sourceFiles = getSourceFiles();
for (ISourceFileCoverage sfData: data.getSourceFiles()) {
SourceFileCoverage sfc = CoverageFactory.eINSTANCE.createSourceFileCoverage();
sfc.load(sfData);
sourceFiles.add(sfc);
}
}
} // PackageCoverage