Top Description Fields Constructors Methods
org.codehaus.groovy.classgen.asm

public Class ExpressionAsVariableSlot

extends BytecodeExpression
Class Inheritance
Imports
org.codehaus.groovy.GroovyBugError, org.codehaus.groovy.ast.expr.Expression, org.codehaus.groovy.classgen.BytecodeExpression, org.objectweb.asm.MethodVisitor

Helper class that takes an Expression and if visited will load it normally, storing the result in a helper variable, which then can be requested after the visit is completed. A copy of the variable will stay on the stack. Subsequent visits will load the stored value instead of visiting the expression again

Field Summary

Modifier and TypeField and Description
private final WriterController
private final Expression
private int
private final String
Inherited from org.codehaus.groovy.classgen.BytecodeExpression:
NOP

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public int
getIndex()

returns the index of the bytecode variable

public String
public void
Inherited from org.codehaus.groovy.classgen.BytecodeExpression:
transformExpressionvisit

Field Detail

controllerback to summary
private final WriterController controller
expback to summary
private final Expression exp
indexback to summary
private int index
nameback to summary
private final String name

Constructor Detail

ExpressionAsVariableSlotback to summary
public ExpressionAsVariableSlot(WriterController controller, Expression expression, String name)
ExpressionAsVariableSlotback to summary
public ExpressionAsVariableSlot(WriterController controller, Expression expression)

Method Detail

getIndexback to summary
public int getIndex()

returns the index of the bytecode variable

getTextback to summary
public String getText()

Overrides org.codehaus.groovy.classgen.BytecodeExpression.getText.

Annotations
@Override
visitback to summary
public void visit(MethodVisitor mv)

Implements abstract org.codehaus.groovy.classgen.BytecodeExpression.visit.

Annotations
@Override