Package org.codehaus.groovy.control

# Enum Class CompilePhase

java.lang.Object
java.lang.Enum<CompilePhase>
org.codehaus.groovy.control.CompilePhase

All Implemented Interfaces:
  `Serializable`, `Comparable<CompilePhase>`, `Constable`

public enum CompilePhase extends Enum<CompilePhase>
The phases of the GroovyCompiler. This is an enum facade on top of the Phases object. In general, prefer using this object over Phases.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `CANONICALIZATION`
  Complete building the AST
  `CLASS_GENERATION`
  creates the binary output in memory
  `CONVERSION`
  An abstract syntax tree (AST) is created from token trees
  `FINALIZATION`
  Perform any last cleanup
  `INITIALIZATION`
  source files are opened and environment configured
  `INSTRUCTION_SELECTION`
  Prepare for class generation, for example static type checking is performed in this phase
  `OUTPUT`
  write the binary output to the file system
  `PARSING`
  the grammar is used to produce tree of tokens representing the source code
  `SEMANTIC_ANALYSIS`
  Performs consistency and validity checks that the grammar can't check for, and resolves classes

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static CompilePhase[]`
  `phases`
  The phases as an array, with a null entry.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CompilePhase`
  `fromPhaseNumber(int phaseNumber)`
  Returns the CompilePhase for the given integer phase number.
  `int`
  `getPhaseNumber()`
  Returns the underlying integer Phase number.
  `static CompilePhase`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static CompilePhase[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

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

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### INITIALIZATION

    public static final CompilePhase INITIALIZATION
    source files are opened and environment configured

  - ### PARSING

    public static final CompilePhase PARSING
    the grammar is used to produce tree of tokens representing the source code

  - ### CONVERSION

    public static final CompilePhase CONVERSION
    An abstract syntax tree (AST) is created from token trees

  - ### SEMANTIC_ANALYSIS

    public static final CompilePhase SEMANTIC_ANALYSIS
    Performs consistency and validity checks that the grammar can't check for, and resolves classes

  - ### CANONICALIZATION

    public static final CompilePhase CANONICALIZATION
    Complete building the AST

  - ### INSTRUCTION_SELECTION

    public static final CompilePhase INSTRUCTION_SELECTION
    Prepare for class generation, for example static type checking is performed in this phase

  - ### CLASS_GENERATION

    public static final CompilePhase CLASS_GENERATION
    creates the binary output in memory

  - ### OUTPUT

    public static final CompilePhase OUTPUT
    write the binary output to the file system

  - ### FINALIZATION

    public static final CompilePhase FINALIZATION
    Perform any last cleanup

- ## Field Details

  - ### phases

    public static CompilePhase[] phases
    The phases as an array, with a null entry.

- ## Method Details

  - ### values

    public static CompilePhase[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static CompilePhase valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getPhaseNumber

    public int getPhaseNumber()
    Returns the underlying integer Phase number.

  - ### fromPhaseNumber

    public static CompilePhase fromPhaseNumber(int phaseNumber)
    Returns the CompilePhase for the given integer phase number.
    Parameters:
      `phaseNumber` - the phase number
    Returns:
      the CompilePhase or null if not found