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

## [Java] Class ImportCustomizerFactory

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

-     public class ImportCustomizerFactory
      extends AbstractFactory

  This factory allows the generation of an import customizer. You may embed several elements:

  - normal for "regular" imports
  - star for "star" imports
  - staticStar for "static star" imports
  - alias for imports with alias
  - staticMember for static imports of individual members
  - module for module imports (JEP 476)
  For example:

      builder.imports {
       alias 'AI', 'java.util.concurrent.atomic.AtomicInteger'
       alias 'AL', 'java.util.concurrent.atomic.AtomicLong'
      }

  Since:
    2.1.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isHandlesNodeChildren()` Indicates that import customizer nodes accept nested closure content.
    `` | `public Object` | `newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)` Creates an import customizer and applies any inline import value.
    `` | `public boolean` | `onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent)` Executes nested builder content against a helper bound to the import customizer.

  - ### 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 import customizer nodes accept nested closure content.

      Returns:
        `true`

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

      Creates an import customizer and applies any inline import value.

      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:
        a configured ImportCustomizer

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

      Executes nested builder content against a helper bound to the import customizer.

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