Class OfflineInstrumentationAccessGenerator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String runtimeClassName  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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
    • Field Detail

      • runtimeClassName

        private final java.lang.String runtimeClassName
    • Constructor Detail

      • OfflineInstrumentationAccessGenerator

        public OfflineInstrumentationAccessGenerator()
        Creates a new instance for offline instrumentation.
      • OfflineInstrumentationAccessGenerator

        OfflineInstrumentationAccessGenerator​(java.lang.String runtimeClassName)
        Creates a new instance with the given runtime class name for testing purposes
        Parameters:
        runtimeClassName - VM name of the runtime class
    • 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