Package: groovy.console.ui

## [Groovy] Class BytecodeCollector

- groovy.console.ui.BytecodeCollector

-     class BytecodeCollector
      extends GroovyClassLoader.ClassCollector

  Captures generated bytecode while delegating normal class creation.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `Map<String, byte[]>` | `bytecode` Captured bytecode keyed by class name.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BytecodeCollector(GroovyClassLoader.ClassCollector delegate, Map<String, byte[]> bytecode)` Creates a collector that stores generated bytecode in the supplied map.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected Class` | `createClass(byte[] code, ClassNode classNode)` Stores generated bytecode before defining the class.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyClassLoader.ClassCollector` | `call, createClass, getDefiningClassLoader, getLoadedClasses, onClassNode`

- - ### Property Detail

    - #### Map<String, byte[]> bytecode

      Captured bytecode keyed by class name.

  - ### Constructor Detail

    - #### BytecodeCollector(GroovyClassLoader.ClassCollector delegate, Map<String, byte[]> bytecode)

      Creates a collector that stores generated bytecode in the supplied map.

      Parameters:
        `delegate` - collector providing the compilation context
        `bytecode` - destination map for generated bytecode

  - ### Method Detail

    - #### @Override
      protected Class createClass(byte[] code, ClassNode classNode)

      Stores generated bytecode before defining the class.