Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.ISourceFileCoverage


        "java/lang/Object", new String[0]);
    ca.setSourceFileName("A.java");
    ClassCoverageImpl cb = new ClassCoverageImpl("p2/B", 2, null,
        "java/lang/Object", new String[0]);
    cb.setSourceFileName("B.java");
    ISourceFileCoverage sb = new SourceFileCoverageImpl("B.java", "p2");
    ISourceFileCoverage sc = new SourceFileCoverageImpl("C.java", "p3");
    BundleCoverageImpl bundle = new BundleCoverageImpl("bundle",
        Arrays.asList((IClassCoverage) ca, (IClassCoverage) cb),
        Arrays.asList(sb, sc));

    Collection<IPackageCoverage> packages = bundle.getPackages();
View Full Code Here


        instructionCounter = CounterImpl.getInstance(9, 0);
      }
    };
    classnode.setSourceFileName("Sample.java");
    // Only source files will be considered for counters:
    final ISourceFileCoverage sourceFile = new SourceFileCoverageImpl(
        "Sample.java", "org/jacoco/test/Sample") {
      {
        classCounter = CounterImpl.getInstance(1, 0);
        methodCounter = CounterImpl.getInstance(2, 0);
        branchCounter = CounterImpl.getInstance(3, 0);
View Full Code Here

        "java/lang/Object", new String[0]);
    ca.setSourceFileName("A.java");
    ClassCoverageImpl cb = new ClassCoverageImpl("p2/B", 2, null,
        "java/lang/Object", new String[0]);
    cb.setSourceFileName("B.java");
    ISourceFileCoverage sb = new SourceFileCoverageImpl("B.java", "p2");
    ISourceFileCoverage sc = new SourceFileCoverageImpl("C.java", "p3");
    BundleCoverageImpl bundle = new BundleCoverageImpl("bundle",
        Arrays.asList((IClassCoverage) ca, (IClassCoverage) cb),
        Arrays.asList(sb, sc));

    Collection<IPackageCoverage> packages = bundle.getPackages();
View Full Code Here

        instructionCounter = CounterImpl.getInstance(9, 0);
      }
    };
    classnode.setSourceFileName("Sample.java");
    // Only source files will be considered for counters:
    final ISourceFileCoverage sourceFile = new SourceFileCoverageImpl(
        "Sample.java", "org/jacoco/test/Sample") {
      {
        classCounter = CounterImpl.getInstance(1, 0);
        methodCounter = CounterImpl.getInstance(2, 0);
        branchCounter = CounterImpl.getInstance(3, 0);
View Full Code Here

      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        modelcoverage.putClassFile(classfile, coverage);
        // Add source file coverage manually in case of binary roots
        // as we will not see compilation units:
        final ISourceFileCoverage source = nodes.getSourceFileCoverage(
            coverage.getPackageName(), coverage.getSourceFileName());
        if (source != null) {
          sources.add(source);
        }
      }
View Full Code Here

    }

    public void visit(ICompilationUnit unit) throws JavaModelException {
      final String vmpackagename = unit.getParent().getElementName()
          .replace('.', '/');
      final ISourceFileCoverage coverage = nodes.getSourceFileCoverage(
          vmpackagename, unit.getElementName());
      if (coverage != null) {
        sources.add(coverage);
        modelcoverage.putCompilationUnit(unit, coverage);
      }
View Full Code Here

      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        modelcoverage.putClassFile(classfile, coverage);
        // Add source file coverage manually in case of binary roots
        // as we will not see compilation units:
        final ISourceFileCoverage source = nodes.getSourceFileCoverage(
            coverage.getPackageName(), coverage.getSourceFileName());
        if (source != null) {
          sources.add(source);
        }
      }
View Full Code Here

    }

    public void visit(ICompilationUnit unit) throws JavaModelException {
      final String vmpackagename = unit.getParent().getElementName()
          .replace('.', '/');
      final ISourceFileCoverage coverage = nodes.getSourceFileCoverage(
          vmpackagename, unit.getElementName());
      if (coverage != null) {
        sources.add(coverage);
        modelcoverage.putCompilationUnit(unit, coverage);
      }
View Full Code Here

      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        modelcoverage.putClassFile(classfile, coverage);
        // Add source file coverage manually in case of binary roots
        // as we will not see compilation units:
        final ISourceFileCoverage source = nodes.getSourceFileCoverage(
            coverage.getPackageName(), coverage.getSourceFileName());
        if (source != null) {
          sources.add(source);
        }
      }
View Full Code Here

    }

    public void visit(ICompilationUnit unit) throws JavaModelException {
      final String vmpackagename = unit.getParent().getElementName()
          .replace('.', '/');
      final ISourceFileCoverage coverage = nodes.getSourceFileCoverage(
          vmpackagename, unit.getElementName());
      if (coverage != null) {
        sources.add(coverage);
        modelcoverage.putCompilationUnit(unit, coverage);
      }
View Full Code Here

TOP

Related Classes of org.jacoco.core.analysis.ISourceFileCoverage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.