Class FrameSnapshot

java.lang.Object
org.jacoco.core.internal.flow.FrameSnapshot
All Implemented Interfaces:
IFrame

class FrameSnapshot extends Object implements IFrame
IFrame implementation which creates snapshots from an AnalyzerAdapter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Object[]
     
    private static final FrameSnapshot
     
    private final Object[]
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    FrameSnapshot(Object[] locals, Object[] stack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(org.objectweb.asm.MethodVisitor mv)
    Emits a frame event with the current content to the given visitor.
    (package private) static IFrame
    create(org.objectweb.asm.commons.AnalyzerAdapter analyzer, int popCount)
    Create a IFrame instance based on the given analyzer.
    private static Object[]
    reduce(List<Object> source, int popCount)
    Reduce double word types into a single slot as required MethodVisitor.visitFrame(int, int, Object[], int, Object[]) method.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • FrameSnapshot

      private FrameSnapshot(Object[] locals, Object[] stack)
  • Method Details

    • create

      static IFrame create(org.objectweb.asm.commons.AnalyzerAdapter analyzer, int popCount)
      Create a IFrame instance based on the given analyzer.
      Parameters:
      analyzer - analyzer instance or null
      popCount - number of items to remove from the operand stack
      Returns:
      IFrame instance. In case the analyzer is null or does not contain stackmap information a "NOP" IFrame is returned.
    • reduce

      private static Object[] reduce(List<Object> source, int popCount)
      Reduce double word types into a single slot as required MethodVisitor.visitFrame(int, int, Object[], int, Object[]) method.
    • accept

      public void accept(org.objectweb.asm.MethodVisitor mv)
      Description copied from interface: IFrame
      Emits a frame event with the current content to the given visitor.
      Specified by:
      accept in interface IFrame
      Parameters:
      mv - method visitor to emit frame event to