Package: org.codehaus.groovy.control.customizers.builder

## [Groovy] Class CompilerCustomizationBuilder

- org.codehaus.groovy.control.customizers.builder.CompilerCustomizationBuilder

-     @AutoFinal
      @CompileStatic
      class CompilerCustomizationBuilder
      extends FactoryBuilderSupport

  A builder which allows easy configuration of compilation customizers. Instead of creating various compilation customizers by hand, you may use this builder instead, which provides a shorter syntax and removes most of the verbosity.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class FactoryBuilderSupport` | `CHILD_BUILDER, CURRENT_BUILDER, CURRENT_FACTORY, CURRENT_NAME, CURRENT_NODE, OWNER, PARENT_BUILDER, PARENT_CONTEXT, PARENT_FACTORY, PARENT_NAME, PARENT_NODE, SCRIPT_CLASS_NAME, attributeDelegates, autoRegistrationComplete, autoRegistrationRunning, explicitMethods, explicitProperties, methodMissingDelegate, postInstantiateDelegates, postNodeCompletionDelegates, preInstantiateDelegates, propertyMissingDelegate, registrationGroup, registrationGroupName`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CompilerCustomizationBuilder()` Creates a builder and registers the supported customization factories.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected Object` | `postNodeCompletion(Object parent, Object node)` Finalizes a node and gives post-completion factories a chance to replace it.
    `` | `static CompilerConfiguration` | `withConfig(CompilerConfiguration config, Closure spec)` Applies compilation customizers declared by the builder DSL to the supplied configuration.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class FactoryBuilderSupport` | `addAttributeDelegate, addDisposalClosure, addPostInstantiateDelegate, addPostNodeCompletionDelegate, addPreInstantiateDelegate, autoRegisterNodes, build, build, build, checkExplicitMethod, checkValueIsNull, checkValueIsType, checkValueIsTypeNotString, createNode, dispatchNodeCall, dispathNodeCall, dispose, getAttributeDelegates, getChildBuilder, getContext, getContextAttribute, getContexts, getContinuationData, getCurrent, getCurrentBuilder, getCurrentFactory, getCurrentName, getDisposalClosures, getExplicitMethods, getExplicitProperties, getFactories, getLocalExplicitMethods, getLocalExplicitProperties, getLocalFactories, getMethodMissingDelegate, getName, getNameMappingClosure, getParentContext, getParentFactory, getParentName, getParentNode, getPostInstantiateDelegates, getPostNodeCompletionDelegates, getPreInstantiateDelegates, getProperty, getPropertyMissingDelegate, getProxyBuilder, getRegistrationGroupItems, getRegistrationGroups, getVariable, getVariables, handleNodeAttributes, invokeMethod, invokeMethod, newContext, nodeCompleted, popContext, postInstantiate, postNodeCompletion, preInstantiate, registerBeanFactory, registerBeanFactory, registerExplicitMethod, registerExplicitMethod, registerExplicitProperty, registerExplicitProperty, registerFactory, registerFactory, removeAttributeDelegate, removePostInstantiateDelegate, removePostNodeCompletionDelegate, removePreInstantiateDelegate, reset, resolveExplicitMethod, resolveExplicitProperty, resolveFactory, restoreFromContinuationData, setClosureDelegate, setMethodMissingDelegate, setNameMappingClosure, setNodeAttributes, setParent, setProperty, setPropertyMissingDelegate, setProxyBuilder, setVariable, withBuilder, withBuilder, withBuilder`
    `class Binding` | `getProperty, getVariable, getVariables, hasVariable, removeVariable, setProperty, setVariable`
    `class GroovyObjectSupport` | `getMetaClass, setMetaClass`

- - ### Constructor Detail

    - #### CompilerCustomizationBuilder()

      Creates a builder and registers the supported customization factories.

  - ### Method Detail

    - #### @Override
      protected Object postNodeCompletion(Object parent, Object node)

      Finalizes a node and gives post-completion factories a chance to replace it.

      Parameters:
        `parent` - the parent builder node
        `node` - the node being completed
      Returns:
        the completed node, possibly replaced by the active factory

    - #### static CompilerConfiguration withConfig(CompilerConfiguration config, @DelegatesTo(type="org.codehaus.groovy.control.customizers.builder.CompilerCustomizationBuilder")
      Closure spec)

      Applies compilation customizers declared by the builder DSL to the supplied configuration.

      Parameters:
        `config` - the compiler configuration to customize
        `spec` - the customization DSL
      Returns:
        the same CompilerConfiguration instance for chaining