Package org.codehaus.groovy.control.customizers

# Class CompilationCustomizer

java.lang.Object
org.codehaus.groovy.control.customizers.CompilationCustomizer

All Implemented Interfaces:
  `CompilationUnit.IPrimaryClassNodeOperation`

Direct Known Subclasses:
  `DelegatingCustomizer`, `ImportCustomizer`, `SecureASTCustomizer`

public abstract class CompilationCustomizer extends Object implements CompilationUnit.IPrimaryClassNodeOperation
Users wanting to customize the configuration process such as adding imports, restricting the language features or apply AST transformations by default should implement this class, then call the `CompilerConfiguration.addCompilationCustomizers(CompilationCustomizer...)` method.

Since:
  1.8.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CompilationCustomizer(CompilePhase phase)`
  Creates a customizer bound to the supplied compile phase.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CompilePhase`
  `getPhase()`
  Returns the compile phase in which this customizer runs.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.control.CompilationUnit.IPrimaryClassNodeOperation

  `call, doPhaseOperation, needSortedInput`

- ## Constructor Details

  - ### CompilationCustomizer

    public CompilationCustomizer(CompilePhase phase)
    Creates a customizer bound to the supplied compile phase.
    Parameters:
      `phase` - the phase in which this customizer should run

- ## Method Details

  - ### getPhase

    public CompilePhase getPhase()
    Returns the compile phase in which this customizer runs.
    Returns:
      the configured compile phase