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
A bytecode expression that loads a variable from a specific slot index.
-
Field Summary
Fields inherited from class org.codehaus.groovy.classgen.BytecodeExpression
NOPFields inherited from class org.codehaus.groovy.ast.expr.Expression
EMPTY_ARRAYFields inherited from interface groovy.lang.groovydoc.GroovydocHolder
DOC_COMMENT -
Constructor Summary
ConstructorsConstructorDescriptionVariableSlotLoader(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
Methods inherited from class org.codehaus.groovy.classgen.BytecodeExpression
getText, transformExpression, visitMethods inherited from class org.codehaus.groovy.ast.expr.Expression
getType, setType, transformExpressions, transformExpressionsMethods inherited from class org.codehaus.groovy.ast.AnnotatedNode
addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSyntheticMethods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler
copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData
-
Constructor Details
-
VariableSlotLoader
Creates a variable slot loader with a specified type and index.- Parameters:
type- the type of the variableindex- the slot index of the variableos- the operand stack
-
VariableSlotLoader
Creates a variable slot loader with a specified index.- Parameters:
index- the slot index of the variableos- the operand stack
-
-
Method Details
-
visit
public void visit(org.objectweb.asm.MethodVisitor mv) Emits bytecode instructions using the provided method visitor.- Specified by:
visitin classBytecodeExpression- 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
-