org.codehaus.groovy.classgen

## Class BytecodeSequence

- java.lang.Object
- - org.codehaus.groovy.ast.ASTNode
  - - org.codehaus.groovy.ast.stmt.Statement
    - - org.codehaus.groovy.classgen.BytecodeSequence

    public class BytecodeSequence
    extends Statement

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(BytecodeInstruction instruction)`
`BytecodeSequence(List instructions)`

### Method Summary

Methods
`List` `getInstructions()`
`void` `visit(GroovyCodeVisitor visitor)` Delegates to the visit method used for this class.

### Methods inherited from class org.codehaus.groovy.ast.stmt.Statement

`getStatementLabel, isEmpty, setStatementLabel`

### Methods inherited from class org.codehaus.groovy.ast.ASTNode

`copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BytecodeSequence

    public BytecodeSequence(List instructions)

#### BytecodeSequence

    public BytecodeSequence(BytecodeInstruction instruction)

### Method Detail

#### 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 sotred by this class. If one element is a BytecodeInstruction, then it will be skipped as it is no ASTNode.

Overrides:
  `visit` in class `ASTNode`
Parameters:
  `visitor` - the visitor
See Also:
  `ClassGenerator`

#### getInstructions

    public List getInstructions()