Package org.jacoco.core.data

Examples of org.jacoco.core.data.ExecutionDataStore


    if (destfile.exists() && (!destfile.canWrite() || !destfile.isFile())) {
      throw new BuildException("Unable to write to destination file");
    }

    final SessionInfoStore infoStore = new SessionInfoStore();
    final ExecutionDataStore dataStore = new ExecutionDataStore();

    loadSourceFiles(infoStore, dataStore);

    OutputStream outputStream = null;
    try {
      FileUtils.getFileUtils().createNewFile(destfile, true);

      outputStream = new BufferedOutputStream(new FileOutputStream(
          destfile));
      final ExecutionDataWriter dataWriter = new ExecutionDataWriter(
          outputStream);
      infoStore.accept(dataWriter);
      dataStore.accept(dataWriter);
    } catch (final IOException e) {
      throw new BuildException(String.format(
          "Unable to write merged file %s", destfile.getName()), e);
    } finally {
      FileUtils.close(outputStream);
View Full Code Here


  private Object access;

  @Before
  public void setup() {
    store = new ExecutionDataStore();
    access = new ExecutionDataAccess(store);
  }
View Full Code Here

  @Before
  public void setup() throws Exception {
    final ClassReader reader = new ClassReader(TargetLoader
        .getClassData(target));
    final ExecutionDataStore store = execute(reader);
    analyze(reader, store);
    source = Source.getSourceFor(target);
  }
View Full Code Here

    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    run(loader.getTargetClass());
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, null, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

  @Before
  public void setup() throws Exception {
    final ClassReader reader = new ClassReader(
        TargetLoader.getClassData(target));
    final ExecutionDataStore store = execute(reader);
    analyze(reader, store);
    source = Source.getSourceFor(target);
  }
View Full Code Here

    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    run(loader.getTargetClass());
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, null, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

  }

  @Override
  protected Runnable getInstrumentedRunnable() throws Exception {
    final byte[] bytes = TargetLoader.getClassDataAsBytes(target);
    final ExecutionDataStore executionData = new ExecutionDataStore();
    ICoverageVisitor visitor = new ICoverageVisitor() {
      public void visitCoverage(IClassCoverage coverage) {
      }
    };
    final Analyzer analyzer = new Analyzer(executionData, visitor);
View Full Code Here

  private CoverageBuilder coverageBuilder;

  @Before
  public void setup() {
    executionData = new ExecutionDataStore();
    coverageBuilder = new CoverageBuilder(executionData);
  }
View Full Code Here

  @Before
  public void setup() throws Exception {
    final ClassReader reader = new ClassReader(TargetLoader
        .getClassData(target));
    final ExecutionDataStore store = execute(reader);
    analyze(reader, store);
    source = Source.getSourceFor(target);
  }
View Full Code Here

    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    run(loader.getTargetClass());
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, null, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.data.ExecutionDataStore

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.