Package org.jacoco.core.instr

Examples of org.jacoco.core.instr.Analyzer.analyze()


  }

  private void analyze(ClassReader reader, ExecutionDataStore store) {
    final CoverageBuilder builder = new CoverageBuilder(store);
    final Analyzer analyzer = new Analyzer(builder);
    analyzer.analyze(reader);
    final Collection<ClassCoverage> classes = builder.getClasses();
    assertEquals(1, classes.size(), 0.0);
    classCoverage = classes.iterator().next();
    final Collection<SourceFileCoverage> files = builder.getSourceFiles();
    assertEquals(1, files.size(), 0.0);
View Full Code Here


  }

  private void analyze(ClassReader reader, ExecutionDataStore store) {
    final CoverageBuilder builder = new CoverageBuilder(store);
    final Analyzer analyzer = new Analyzer(builder);
    analyzer.analyze(reader);
    final Collection<ClassCoverage> classes = builder.getClasses();
    assertEquals(1, classes.size(), 0.0);
    classCoverage = classes.iterator().next();
    final Collection<SourceFileCoverage> files = builder.getSourceFiles();
    assertEquals(1, files.size(), 0.0);
View Full Code Here

    ClassReader reader = new ClassReader(TargetLoader.getClassData(clazz));

    final ClassDataRecorder rec = new ClassDataRecorder();
    final Analyzer analyzer = new Analyzer(rec);
    analyzer.analyze(reader);

    final Instrumenter instr = new Instrumenter(runtime);
    final byte[] instrumentedBuffer = instr.instrument(reader);
    final TargetLoader loader = new TargetLoader(clazz, instrumentedBuffer);
View Full Code Here

          in.close();
          continue;
        }
        if (resource.getName().toLowerCase().endsWith(".class")) {
          final InputStream in = resource.getInputStream();
          analyzer.analyze(in);
          in.close();
        }
      }
      return builder.getBundle(group.name);
    }
View Full Code Here

          in.close();
          continue;
        }
        if (resource.getName().toLowerCase().endsWith(".class")) {
          final InputStream in = resource.getInputStream();
          analyzer.analyze(in);
          in.close();
        }
      }
      return builder.getBundle(group.name);
    }
View Full Code Here

    // Together with the original class definition we can calculate coverage
    // information:
    final CoverageBuilder coverageBuilder = new CoverageBuilder(
        executionData);
    final Analyzer analyzer = new Analyzer(coverageBuilder);
    analyzer.analyze(getTargetClass(targetName));

    // Let's dump some metrics and line coverage information:
    for (final ClassCoverage cc : coverageBuilder.getClasses()) {
      System.out.printf("Coverage of class %s%n", cc.getSimpleName());
View Full Code Here

    ClassReader reader = new ClassReader(TargetLoader.getClassData(clazz));

    final ClassDataRecorder rec = new ClassDataRecorder();
    final Analyzer analyzer = new Analyzer(rec);
    analyzer.analyze(reader);

    final Instrumenter instr = new Instrumenter(runtime);
    final byte[] instrumentedBuffer = instr.instrument(reader);
    final TargetLoader loader = new TargetLoader(clazz, instrumentedBuffer);
View Full Code Here

  private void analyze(final ClassReader reader,
      final ExecutionDataStore store) {
    final CoverageBuilder builder = new CoverageBuilder(store);
    final Analyzer analyzer = new Analyzer(builder);
    analyzer.analyze(reader);
    final Collection<ClassCoverage> classes = builder.getClasses();
    assertEquals(1, classes.size(), 0.0);
    classCoverage = classes.iterator().next();
    final Collection<SourceFileCoverage> files = builder.getSourceFiles();
    assertEquals(1, files.size(), 0.0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.