Class ExpressionAsVariableSlot

All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, NodeMetaDataHandler

public class ExpressionAsVariableSlot extends BytecodeExpression
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
  • Constructor Details

  • Method Details

    • visit

      public void visit(org.objectweb.asm.MethodVisitor mv)
      Specified by:
      visit in class BytecodeExpression
    • getIndex

      public int getIndex()
      returns the index of the bytecode variable
    • getText

      public String getText()
      Description copied from class: ASTNode
      Returns a human-readable text representation of this AST node. Used for debugging and error messages. Default implementation returns a message indicating the representation is not yet implemented for this node type.
      Overrides:
      getText in class BytecodeExpression
      Returns:
      text representation of this node, or placeholder for unimplemented types