org.jacoco.core.runtime
Interface IRuntime

All Superinterfaces:
IExecutionDataAccessorGenerator
All Known Implementing Classes:
AbstractRuntime, LoggerRuntime, ModifiedSystemClassRuntime, SystemPropertiesRuntime

public interface IRuntime
extends IExecutionDataAccessorGenerator

This interface represents a particular mechanism to collect execution information in the target VM at runtime.

Version:
$Revision: $
Author:
Marc R. Hoffmann

Method Summary
 void collect(IExecutionDataVisitor visitor, boolean reset)
          Collects the current execution data and writes it to the given IExecutionDataVisitor object.
 void reset()
          Resets all coverage information.
 void shutdown()
          Allows the coverage runtime to cleanup internals.
 void startup()
          Starts the coverage runtime.
 
Methods inherited from interface org.jacoco.core.runtime.IExecutionDataAccessorGenerator
generateDataAccessor
 

Method Detail

startup

void startup()
             throws Exception
Starts the coverage runtime. This method MUST be called before any class instrumented for this runtime is loaded.

Throws:
Exception - any internal problem during startup

shutdown

void shutdown()
Allows the coverage runtime to cleanup internals. This class should be called when classes instrumented for this runtime are not used any more.


collect

void collect(IExecutionDataVisitor visitor,
             boolean reset)
Collects the current execution data and writes it to the given IExecutionDataVisitor object. This method must only be called between startup() and shutdown().

Parameters:
visitor - handler to write coverage data to
reset - if true the current coverage information is also cleared

reset

void reset()
Resets all coverage information. This method must only be called between startup() and shutdown().