Class BundleCoverageImpl
- java.lang.Object
-
- org.jacoco.core.analysis.CoverageNodeImpl
-
- org.jacoco.core.internal.analysis.BundleCoverageImpl
-
- All Implemented Interfaces:
IBundleCoverage
,ICoverageNode
public class BundleCoverageImpl extends CoverageNodeImpl implements IBundleCoverage
Implementation ofIBundleCoverage
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jacoco.core.analysis.ICoverageNode
ICoverageNode.CounterEntity, ICoverageNode.ElementType
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<IPackageCoverage>
packages
-
Fields inherited from class org.jacoco.core.analysis.CoverageNodeImpl
branchCounter, classCounter, complexityCounter, instructionCounter, lineCounter, methodCounter
-
-
Constructor Summary
Constructors Constructor Description BundleCoverageImpl(java.lang.String name, java.util.Collection<IClassCoverage> classes, java.util.Collection<ISourceFileCoverage> sourcefiles)
Creates a new instance of a bundle with the given name.BundleCoverageImpl(java.lang.String name, java.util.Collection<IPackageCoverage> packages)
Creates a new instance of a bundle with the given name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> void
addByName(java.util.Map<java.lang.String,java.util.Collection<T>> map, java.lang.String name, T value)
java.util.Collection<IPackageCoverage>
getPackages()
Returns all packages contained in this bundle.private static java.util.Collection<IPackageCoverage>
groupByPackage(java.util.Collection<IClassCoverage> classes, java.util.Collection<ISourceFileCoverage> sourcefiles)
-
Methods inherited from class org.jacoco.core.analysis.CoverageNodeImpl
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy, increment, increment, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jacoco.core.analysis.ICoverageNode
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy
-
-
-
-
Field Detail
-
packages
private final java.util.Collection<IPackageCoverage> packages
-
-
Constructor Detail
-
BundleCoverageImpl
public BundleCoverageImpl(java.lang.String name, java.util.Collection<IPackageCoverage> packages)
Creates a new instance of a bundle with the given name.- Parameters:
name
- name of this bundlepackages
- collection of all packages contained in this bundle
-
BundleCoverageImpl
public BundleCoverageImpl(java.lang.String name, java.util.Collection<IClassCoverage> classes, java.util.Collection<ISourceFileCoverage> sourcefiles)
Creates a new instance of a bundle with the given name. The packages are calculated from the given classes and source files.- Parameters:
name
- name of this bundleclasses
- all classes in this bundlesourcefiles
- all source files in this bundle
-
-
Method Detail
-
groupByPackage
private static java.util.Collection<IPackageCoverage> groupByPackage(java.util.Collection<IClassCoverage> classes, java.util.Collection<ISourceFileCoverage> sourcefiles)
-
addByName
private static <T> void addByName(java.util.Map<java.lang.String,java.util.Collection<T>> map, java.lang.String name, T value)
-
getPackages
public java.util.Collection<IPackageCoverage> getPackages()
Description copied from interface:IBundleCoverage
Returns all packages contained in this bundle.- Specified by:
getPackages
in interfaceIBundleCoverage
- Returns:
- all packages
-
-