Package: org.codehaus.groovy.classgen

## [Java] Class BytecodeSequence

- org.codehaus.groovy.classgen.BytecodeSequence

- This class represents a sequence of BytecodeInstructions or ASTNodes. The evaluation is depending on the type of the visitor.

  See Also:
    BytecodeInstruction
    ASTNode

- - ### Constructor Summary

    Constructors
    Constructor and description
    `BytecodeSequence (List instructions)`
    `BytecodeSequence (BytecodeInstruction instruction)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `List` | `getInstructions()`
    `void` | `visit(GroovyCodeVisitor visitor)` Delegates to the visit method used for this class.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Statement` | `getStatementLabel, isEmpty, setStatementLabel`
    `class ASTNode` | `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public BytecodeSequence(List instructions)

    - #### public BytecodeSequence(BytecodeInstruction instruction)

  - ### Method Detail

    - #### public List getInstructions()

    - #### public void visit(GroovyCodeVisitor visitor)

      Delegates to the visit method used for this class. If the visitor is a ClassGenerator, then ClassGenerator.visitBytecodeSequence 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.

      Parameters:
        `visitor` - the visitor
      See Also:
        ClassGenerator