Class FrameSnapshot

  • All Implemented Interfaces:
    IFrame

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

      Fields 
      Modifier and Type Field Description
      private java.lang.Object[] locals  
      private static FrameSnapshot NOP  
      private java.lang.Object[] stack  
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      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 java.lang.Object[] reduce​(java.util.List<java.lang.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 Detail

      • locals

        private final java.lang.Object[] locals
      • stack

        private final java.lang.Object[] stack
    • Constructor Detail

      • FrameSnapshot

        private FrameSnapshot​(java.lang.Object[] locals,
                              java.lang.Object[] stack)
    • Method Detail

      • 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 java.lang.Object[] reduce​(java.util.List<java.lang.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