Package: groovy.console.ui

## [Groovy] Class TreeNodeBuildingNodeOperation

- groovy.console.ui.TreeNodeBuildingNodeOperation

- All Implemented Interfaces and Traits:
    IPrimaryClassNodeOperation

      class TreeNodeBuildingNodeOperation
      extends Object
      implements IPrimaryClassNodeOperation

  This Node Operation builds up a root tree node for the viewer.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `ScriptToTreeNodeAdapter` | `adapter` Adapter used to create child nodes.
    `Object` | `nodeMaker` Factory used to create tree nodes.
    `Object` | `root` Root node for the generated tree.
    `Object` | `showClosureClasses` Whether generated closure classes should be included.
    `Object` | `showScriptClass` Whether the generated script class should be included.
    `Object` | `showScriptFreeForm` Whether free-form script statements should be included.
    `Object` | `sourceCollected` Tracks whether free-form source nodes were already collected.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `TreeNodeBuildingNodeOperation(ScriptToTreeNodeAdapter adapter, Object showScriptFreeForm, Object showScriptClass)` Creates an operation with closure class nodes hidden.
    `TreeNodeBuildingNodeOperation(ScriptToTreeNodeAdapter adapter, Object showScriptFreeForm, Object showScriptClass, Object showClosureClasses)` Creates an operation for building the AST tree.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `call(SourceUnit source, GeneratorContext context, ClassNode classNode)` Adds the current class node and optional script statements to the tree.
    `` | `protected void` | `makeClosureClassTreeNodes(ClassNode classNode)` Adds generated closure and lambda classes for the supplied outer class.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Property Detail

    - #### final ScriptToTreeNodeAdapter adapter

      Adapter used to create child nodes.

    - #### final Object nodeMaker

      Factory used to create tree nodes.

    - #### final Object root

      Root node for the generated tree.

    - #### final Object showClosureClasses

      Whether generated closure classes should be included.

    - #### final Object showScriptClass

      Whether the generated script class should be included.

    - #### final Object showScriptFreeForm

      Whether free-form script statements should be included.

    - #### final Object sourceCollected

      Tracks whether free-form source nodes were already collected.

  - ### Constructor Detail

    - #### TreeNodeBuildingNodeOperation(ScriptToTreeNodeAdapter adapter, Object showScriptFreeForm, Object showScriptClass)

      Creates an operation with closure class nodes hidden.

      Parameters:
        `adapter` - adapter used to create tree nodes
        `showScriptFreeForm` - whether free-form script statements should be shown
        `showScriptClass` - whether the generated script class should be shown

    - #### TreeNodeBuildingNodeOperation(ScriptToTreeNodeAdapter adapter, Object showScriptFreeForm, Object showScriptClass, Object showClosureClasses)

      Creates an operation for building the AST tree.

      Parameters:
        `adapter` - adapter used to create tree nodes
        `showScriptFreeForm` - whether free-form script statements should be shown
        `showScriptClass` - whether the generated script class should be shown
        `showClosureClasses` - whether generated closure classes should be shown

  - ### Method Detail

    - #### @Override
      void call(SourceUnit source, GeneratorContext context, ClassNode classNode)

      Adds the current class node and optional script statements to the tree.

    - #### protected void makeClosureClassTreeNodes(ClassNode classNode)

      Adds generated closure and lambda classes for the supplied outer class.

      Parameters:
        `classNode` - outer class being inspected