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

## [Java] Class InlinedASTCustomizerFactory

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

- All Implemented Interfaces and Traits:
    PostCompletionFactory

      public class InlinedASTCustomizerFactory
      extends AbstractFactory
      implements PostCompletionFactory

  This factory lets a user define a compilation customizer without having to define an anonymous inner class.

  Here is an example, which only logs the class name during compilation:

       inline(phase:'CONVERSION') { source, context, classNode ->
           println "visiting $classNode"
       }

  Since:
    2.1.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isHandlesNodeChildren()` Indicates that inline customizer nodes accept nested closure content.
    `` | `public Object` | `newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)` Creates the backing map used to build a proxy customizer.
    `` | `public boolean` | `onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent)` Stores the inline customization closure on the backing node.
    `` | `public Object` | `postCompleteNode(FactoryBuilderSupport factory, Object parent, Object node)` Builds the proxy-backed compilation customizer once the node is complete.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractFactory` | `isHandlesNodeChildren, isLeaf, onFactoryRegistration, onHandleNodeAttributes, onNodeChildren, onNodeCompleted, setChild, setParent`

- - ### Method Detail

    - #### public boolean isHandlesNodeChildren()

      Indicates that inline customizer nodes accept nested closure content.

      Returns:
        `true`

    - #### public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)

      Creates the backing map used to build a proxy customizer.

      throws:
        InstantiationException if instantiation fails
      throws:
        IllegalAccessException if access fails
      Parameters:
        `builder` - the active builder
        `name` - the node name
        `value` - the supplied node value
        `attributes` - the node attributes
      Returns:
        the backing attribute map

    - #### public boolean onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent)

      Stores the inline customization closure on the backing node.

      Parameters:
        `builder` - the active builder
        `node` - the current node
        `childContent` - the nested closure content
      Returns:
        `false` to continue normal processing

    - #### public Object postCompleteNode(FactoryBuilderSupport factory, Object parent, Object node)

      Builds the proxy-backed compilation customizer once the node is complete.

      Parameters:
        `factory` - the active builder
        `parent` - the parent node
        `node` - the completed node
      Returns:
        the generated customizer or the original node