Package org.codehaus.groovy.classgen.asm

# Class VariableSlotLoader

java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.expr.Expression
org.codehaus.groovy.classgen.BytecodeExpression
org.codehaus.groovy.classgen.asm.VariableSlotLoader

All Implemented Interfaces:
  `GroovydocHolder<AnnotatedNode>`, `NodeMetaDataHandler`

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

- ## Field Summary

  ### Fields inherited from class org.codehaus.groovy.classgen.BytecodeExpression

  `NOP`

  ### Fields inherited from class org.codehaus.groovy.ast.expr.Expression

  `EMPTY_ARRAY`

  ### Fields inherited from interface groovy.lang.groovydoc.GroovydocHolder

  `DOC_COMMENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VariableSlotLoader(int index, OperandStack os)`
  Creates a variable slot loader with a specified index.
  `VariableSlotLoader(ClassNode type, int index, OperandStack os)`
  Creates a variable slot loader with a specified type and index.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getIndex()`
  Returns the slot index of the variable.
  `void`
  `visit(org.objectweb.asm.MethodVisitor mv)`
  Emits bytecode instructions using the provided method visitor.

  ### Methods inherited from class org.codehaus.groovy.classgen.BytecodeExpression

  `getText, transformExpression, visit`

  ### Methods inherited from class org.codehaus.groovy.ast.expr.Expression

  `getType, setType, transformExpressions, transformExpressions`

  ### Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode

  `addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`

  ### Methods inherited from class org.codehaus.groovy.ast.ASTNode

  `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler

  `copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData`

- ## 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