org.jacoco.core.runtime
Interface IExecutionDataAccessorGenerator

All Known Subinterfaces:
IRuntime
All Known Implementing Classes:
AbstractRuntime, LoggerRuntime, ModifiedSystemClassRuntime, OfflineInstrumentationAccessGenerator, SystemPropertiesRuntime, URLStreamHandlerRuntime

public interface IExecutionDataAccessorGenerator

The instrumented classes need a piece of code that obtains a boolean[] instance from the runtime. The mechanism is runtime specific and therefore abstracted by this interface. Implementations are provided by IRuntime implementations and are used by the instrumentation process.


Method Summary
 int generateDataAccessor(long classid, 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.
 

Method Detail

generateDataAccessor

int generateDataAccessor(long classid,
                         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. 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.

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


Copyright © 2009-2014 Mountainminds GmbH & Co. KG. All Rights Reserved.