Class VariableSlotLoader

All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, NodeMetaDataHandler

public class VariableSlotLoader extends BytecodeExpression
A bytecode expression that loads a variable from a specific slot index.
  • Constructor Details

    • VariableSlotLoader

      public VariableSlotLoader(ClassNode type, int index, OperandStack os)
      Creates a variable slot loader with a specified type and index.
      Parameters:
      type - the type of the variable
      index - the slot index of the variable
      os - the operand stack
    • VariableSlotLoader

      public VariableSlotLoader(int index, OperandStack os)
      Creates a variable slot loader with a specified index.
      Parameters:
      index - the slot index of the variable
      os - the operand stack
  • Method Details

    • visit

      public void visit(org.objectweb.asm.MethodVisitor mv)
      Emits bytecode instructions using the provided method visitor.
      Specified by:
      visit in class BytecodeExpression
      Parameters:
      mv - the ASM method visitor to generate bytecode
    • getIndex

      public int getIndex()
      Returns the slot index of the variable.
      Returns:
      the variable slot index