Package: org.codehaus.groovy.classgen.asm

## [Java] Class ExpressionAsVariableSlot

- org.codehaus.groovy.classgen.asm.ExpressionAsVariableSlot

- 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

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class BytecodeExpression` | `NOP`
    `class Expression` | `EMPTY_ARRAY`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ExpressionAsVariableSlot (WriterController controller, Expression expression, String name)`
    `ExpressionAsVariableSlot (WriterController controller, Expression expression)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `int` | `getIndex()` returns the index of the bytecode variable
    `` | `String` | `getText()`
    `` | `void` | `visit(org.objectweb.asm.MethodVisitor mv)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class BytecodeExpression` | `transformExpression, visit, visit, visit`
    `class Expression` | `getType, setType, transformExpression, transformExpressions, transformExpressions`
    `class AnnotatedNode` | `addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`
    `class ASTNode` | `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, hashCode, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit`

- - ### Constructor Detail

    - #### public ExpressionAsVariableSlot(WriterController controller, Expression expression, String name)

    - #### public ExpressionAsVariableSlot(WriterController controller, Expression expression)

  - ### Method Detail

    - #### public int getIndex()

      returns the index of the bytecode variable

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public String getText()

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visit(org.objectweb.asm.MethodVisitor mv)