Enum CompilePhase

java.lang.Object
java.lang.Enum<CompilePhase>
org.codehaus.groovy.control.CompilePhase
All Implemented Interfaces:
Serializable, Comparable<CompilePhase>, java.lang.constant.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.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

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

      public static CompilePhase valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getPhaseNumber

      public int getPhaseNumber()
      Returns the underlieng 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