Package: org.codehaus.groovy.control.customizers

## [Java] Class ImportCustomizer

- org.codehaus.groovy.control.customizers.ImportCustomizer

-     public class ImportCustomizer
      extends CompilationCustomizer

  This compilation customizer allows adding various types of imports to the compilation unit. Supports adding:

  - standard imports via addImports(String...) or addImport(String, String)
  - star imports via addStarImports(String...)
  - static imports via addStaticImport(String, String) or addStaticImport(String, String, String)
  - static star imports via addStaticStars(String...)
  Since:
    1.8.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ImportCustomizer()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public ImportCustomizer` | `addImport(String alias, String className)`
    `` | `public ImportCustomizer` | `addImports(String classNames)`
    `` | `public ImportCustomizer` | `addStarImports(String packageNames)`
    `` | `public ImportCustomizer` | `addStaticImport(String className, String fieldName)`
    `` | `public ImportCustomizer` | `addStaticImport(String alias, String className, String fieldName)`
    `` | `public ImportCustomizer` | `addStaticStars(String classNames)`
    `` | `public void` | `call(SourceUnit source, GeneratorContext context, ClassNode classNode)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class CompilationCustomizer` | `getPhase`

- - ### Constructor Detail

    - #### public ImportCustomizer()

  - ### Method Detail

    - #### public ImportCustomizer addImport(String alias, String className)

    - #### public ImportCustomizer addImports(String classNames)

    - #### public ImportCustomizer addStarImports(String packageNames)

    - #### public ImportCustomizer addStaticImport(String className, String fieldName)

    - #### public ImportCustomizer addStaticImport(String alias, String className, String fieldName)

    - #### public ImportCustomizer addStaticStars(String classNames)

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