Class AdviceAdapter.StackFrame

java.lang.Object
org.objectweb.asm.commons.AdviceAdapter.StackFrame
Enclosing class:
AdviceAdapter

static final class AdviceAdapter.StackFrame extends Object
A stack map frame represented with one bit per element. Each bit indicates whether the element is UNINITIALIZED_THIS (bit = 1), or OTHER (i.e., any other value; bit = 0).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) long[]
    The values of the local variables.
    (package private) long[]
    The values on the stack.
    (package private) int
    The number of values on the stack.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an empty stack map frame.
    Constructs a copy of the given stack map frame.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static long[]
    arraycopy(long[] array, int newLength)
    Returns a copy of the given array, possibly with a larger size.
    (package private) boolean
    getLocal(int index)
    Returns the value of the given local variable.
    (package private) boolean
    pop()
    Pops a value from the stack and returns its value.
    (package private) void
    push(boolean value)
    Pushes a new value on the stack.
    (package private) void
    setLocal(int index, boolean value)
    Sets the value of the given local variable.
    (package private) int
    Returns the number of bytes used by object in memory.

    Methods inherited from class java.lang.Object

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

    • locals

      long[] locals
      The values of the local variables. Long and double are represented with two values (i.e., two bits equal to OTHER). Local variables whose index is larger than the number of bits in this array are equal to OTHER.
    • stack

      long[] stack
      The values on the stack. Long and double are represented with two values (i.e., two bits equal to OTHER).
    • stackSize

      int stackSize
      The number of values on the stack.
  • Constructor Details

    • StackFrame

      StackFrame()
      Constructs an empty stack map frame.
    • StackFrame

      StackFrame(AdviceAdapter.StackFrame stackFrame)
      Constructs a copy of the given stack map frame.
      Parameters:
      stackFrame - the stack map frame to copy.
  • Method Details

    • getLocal

      boolean getLocal(int index)
      Returns the value of the given local variable.
      Parameters:
      index - a local variable index.
      Returns:
      the local variable value
    • setLocal

      void setLocal(int index, boolean value)
      Sets the value of the given local variable.
      Parameters:
      index - a local variable index.
      value - the new local variable value.
    • push

      void push(boolean value)
      Pushes a new value on the stack.
      Parameters:
      value - the value to push.
    • pop

      boolean pop()
      Pops a value from the stack and returns its value.
      Returns:
      the value popped from the stack.
    • sizeInBytes

      int sizeInBytes()
      Returns the number of bytes used by object in memory.
      Returns:
      the number of bytes used by object in memory. In theory, might be negative in case of overflow. In practice this should never happen.
    • arraycopy

      static long[] arraycopy(long[] array, int newLength)
      Returns a copy of the given array, possibly with a larger size.
      Parameters:
      array - the array to copy.
      newLength - the length of the copied array (must be greater than or equal to array.length).
      Returns:
      the copied array.