Package org.jacoco.core.runtime

Examples of org.jacoco.core.runtime.IRuntime.startup()


    String sessionId = options.getSessionId();
    if (sessionId == null) {
      sessionId = createSessionId();
    }
    runtime.setSessionId(sessionId);
    runtime.startup();
    inst.addTransformer(new CoverageTransformer(runtime, options, logger));
    controller = createAgentController();
    controller.startup(options, runtime);
  }
View Full Code Here


    final byte[] instrumented = instr
        .instrument(getTargetClass(targetName));

    // Now we're ready to run our instrumented class and need to startup the
    // runtime first:
    runtime.startup();

    // In this tutorial we use a special class loader to directly load the
    // instrumented class definition from a byte[] instances.
    final MemoryClassLoader memoryClassLoader = new MemoryClassLoader();
    memoryClassLoader.addDefinition(targetName, instrumented);
View Full Code Here

    String sessionId = options.getSessionId();
    if (sessionId == null) {
      sessionId = createSessionId();
    }
    runtime.setSessionId(sessionId);
    runtime.startup();
    inst.addTransformer(new CoverageTransformer(runtime, options, logger));
    controller = createAgentController();
    controller.startup(options, runtime);
  }
View Full Code Here

  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    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, false);
View Full Code Here

  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    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);
View Full Code Here

    final byte[] instrumented = instr
        .instrument(getTargetClass(targetName));

    // Now we're ready to run our instrumented class and need to startup the
    // runtime first:
    runtime.startup();

    // In this tutorial we use a special class loader to directly load the
    // instrumented class definition from a byte[] instances.
    final MemoryClassLoader memoryClassLoader = new MemoryClassLoader();
    memoryClassLoader.addDefinition(targetName, instrumented);
View Full Code Here

  @Override
  @SuppressWarnings("unchecked")
  protected Callable<Void> getInstrumentedCallable() throws Exception {
    ClassReader reader = new ClassReader(TargetLoader.getClassData(target));
    IRuntime runtime = new LoggerRuntime();
    runtime.startup(new RuntimeData());
    final Instrumenter instr = new Instrumenter(runtime);
    final byte[] instrumentedBuffer = instr.instrument(reader);
    final TargetLoader loader = new TargetLoader();

    return (Callable<Void>) loader.add(target, instrumentedBuffer)
View Full Code Here

    final AgentOptions agentOptions = new AgentOptions(options);

    final Agent agent = Agent.getInstance(agentOptions);

    final IRuntime runtime = createRuntime(inst);
    runtime.startup(agent.getData());
    inst.addTransformer(new CoverageTransformer(runtime, agentOptions,
        IExceptionLogger.SYSTEM_ERR));
  }

  private static IRuntime createRuntime(final Instrumentation inst)
View Full Code Here

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    RuntimeData data = new RuntimeData();
    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup(data);
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    run(loader.add(target, bytes));
    final ExecutionDataStore store = new ExecutionDataStore();
    data.collect(store, new SessionInfoStore(), false);
    runtime.shutdown();
View Full Code Here

        getTargetClass(targetName), targetName);

    // Now we're ready to run our instrumented class and need to startup the
    // runtime first:
    final RuntimeData data = new RuntimeData();
    runtime.startup(data);

    // In this tutorial we use a special class loader to directly load the
    // instrumented class definition from a byte[] instances.
    final MemoryClassLoader memoryClassLoader = new MemoryClassLoader();
    memoryClassLoader.addDefinition(targetName, instrumented);
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.