Package org.jacoco.core.runtime

## Class OfflineInstrumentationAccessGenerator

- java.lang.Object
- - org.jacoco.core.runtime.OfflineInstrumentationAccessGenerator

All Implemented Interfaces:
  `IExecutionDataAccessorGenerator`

    public class OfflineInstrumentationAccessGenerator
    extends java.lang.Object
    implements IExecutionDataAccessorGenerator

This implementation of `IExecutionDataAccessorGenerator` generate a direct dependency to the JaCoCo runtime agent to initialize the runtime and obtain probe arrays. This generator is designed for offline instrumentation only.

### Constructor Summary

Constructors
`OfflineInstrumentationAccessGenerator()` Creates a new instance for offline instrumentation.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `generateDataAccessor​(long classid, java.lang.String classname, int probecount, org.objectweb.asm.MethodVisitor mv)` This method generates the byte code required to obtain the coverage data structure for the class with the given id.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### OfflineInstrumentationAccessGenerator

    public OfflineInstrumentationAccessGenerator()

Creates a new instance for offline instrumentation.

### Method Detail

#### generateDataAccessor

    public int generateDataAccessor​(long classid,
                                    java.lang.String classname,
                                    int probecount,
                                    org.objectweb.asm.MethodVisitor mv)

Description copied from interface: `IExecutionDataAccessorGenerator`
This method generates the byte code required to obtain the coverage data structure for the class with the given id. Typically the instrumentation process will embed this code into a method that is called on class initialization. This method can be called at any time even outside the target VM. The generated code must push a `boolean[]` instance to the operand stack. Except this result object the generated code must not make any assumptions about the structure of the embedding method or class. The generated code must not use or allocate local variables.

Specified by:
  `generateDataAccessor` in interface `IExecutionDataAccessorGenerator`
Parameters:
  `classid` - identifier of the class
  `classname` - VM class name
  `probecount` - probe count for this class
  `mv` - code output
Returns:
  additional stack size required by the implementation, including the instance pushed to the stack