CoverageBuilder (JaCoCo 0.6.3.201306030806 API)
Date: 2013-06-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jacoco.core.analysis
Class CoverageBuilder

    java.lang.Object
      org.jacoco.core.analysis.CoverageBuilder

All Implemented Interfaces:
  ICoverageVisitor

    public class CoverageBuilder

extends Object
implements ICoverageVisitor

Builder for hierarchical `ICoverageNode` structures from single `IClassCoverage` nodes. The nodes are feed into the builder through its `ICoverageVisitor` interface. Afterwards the aggregated data can be obtained with `getClasses()`, `getSourceFiles()` or `getBundle(String)` in the following hierarchy:

     IBundleCoverage
     +-- IPackageCoverage*
         +-- IClassCoverage*
         +-- ISourceFileCoverage*

Constructor Summary
`CoverageBuilder()` Create a new builder.

Method Summary
`IBundleCoverage` | `getBundle(String name)` Creates a bundle from all nodes currently contained in this bundle.
`Collection<IClassCoverage>` | `getClasses()` Returns all class nodes currently contained in this builder.
`Collection<ISourceFileCoverage>` | `getSourceFiles()` Returns all source file nodes currently contained in this builder.
`void` | `visitCoverage(IClassCoverage coverage)` For analyzed class coverage data is emitted to this method.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CoverageBuilder

    public CoverageBuilder()

  Create a new builder.

Method Detail

### getClasses

    public Collection<IClassCoverage> getClasses()

  Returns all class nodes currently contained in this builder.

  Returns:
    all class nodes

### getSourceFiles

    public Collection<ISourceFileCoverage> getSourceFiles()

  Returns all source file nodes currently contained in this builder.

  Returns:
    all source file nodes

### getBundle

    public IBundleCoverage getBundle(String name)

  Creates a bundle from all nodes currently contained in this bundle.

  Parameters:
    `name` - Name of the bundle
  Returns:
    bundle containing all classes and source files

### visitCoverage

    public void visitCoverage(IClassCoverage coverage)

  Description copied from interface: `ICoverageVisitor`
  For analyzed class coverage data is emitted to this method.

  Specified by:
    `visitCoverage` in interface `ICoverageVisitor`
  Parameters:
    `coverage` - coverage data for a class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009-2013 Mountainminds GmbH & Co. KG. All Rights Reserved.