BytecodeSequence (Groovy 4.0.15)

Package: org.codehaus.groovy.classgen

## [Java] Class BytecodeSequence

- 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.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `interface Statement` | `CLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, CLOSE_ALL_RESULTS, SUCCESS_NO_INFO, EXECUTE_FAILED, RETURN_GENERATED_KEYS, NO_GENERATED_KEYS`

  - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public BytecodeInstruction` | `getBytecodeInstruction()` Returns the singular BytecodeInstruction.
    `` | `public List<?>` | `getInstructions()`
    `` | `public void` | `visit(GroovyCodeVisitor visitor)` Delegates to the visit method used for this class.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Statement` | `getConnection, isClosed, execute, execute, execute, execute, close, cancel, getFetchDirection, getFetchSize, clearWarnings, getWarnings, setFetchDirection, setFetchSize, getResultSet, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getMaxFieldSize, executeQuery, getMaxRows, setPoolable, executeBatch, getLargeMaxRows, setQueryTimeout, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getUpdateCount, closeOnCompletion, setCursorName, clearBatch, getGeneratedKeys, enquoteIdentifier, getResultSetType, getMoreResults, getMoreResults, isPoolable, addBatch, enquoteLiteral, setMaxFieldSize, executeLargeBatch, setMaxRows, setLargeMaxRows, getQueryTimeout, isSimpleIdentifier, setEscapeProcessing, getResultSetHoldability, getLargeUpdateCount, enquoteNCharLiteral, getResultSetConcurrency, isCloseOnCompletion, unwrap, isWrapperFor`

- - ### Constructor Detail

    - #### public BytecodeSequence(BytecodeInstruction instruction)

    - #### public BytecodeSequence(List<?> instructions)

  - ### Method Detail

    - #### public BytecodeInstruction getBytecodeInstruction()

      Returns the singular BytecodeInstruction.

      Returns:
        `null` if instruction(s) is not a BytecodeInstruction

    - #### public List<?> getInstructions()

    - #### @Override
      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.

      See Also:
        ClassGenerator