Class BytecodeSequence

All Implemented Interfaces:

public class BytecodeSequence extends Statement
This class represents a sequence of BytecodeInstructions or ASTNodes. The evaluation is depending on the type of the visitor.
  • Constructor Details

    • BytecodeSequence

      public BytecodeSequence(BytecodeInstruction instruction)
    • BytecodeSequence

      public BytecodeSequence(List<?> instructions)
  • Method Details

    • getInstructions

      public List<?> getInstructions()
    • getBytecodeInstruction

      public BytecodeInstruction getBytecodeInstruction()
      Returns the singular BytecodeInstruction.
      null if instruction(s) is not a BytecodeInstruction
    • visit

      public void visit(GroovyCodeVisitor visitor)
      Delegates to the visit method used for this class. If the visitor is a ClassGenerator, then ClassGenerator.visitBytecodeSequence(BytecodeSequence) is called with this instance. If the visitor is no ClassGenerator, then this method will call visit on each ASTNode element sorted by this class. If one element is a BytecodeInstruction, then it will be skipped as it is no ASTNode.
      visit in class ASTNode
      See Also: