Package org.codehaus.groovy.control
Enum 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.
-
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 ASTCLASS_GENERATION
creates the binary output in memoryCONVERSION
An abstract syntax tree (AST) is created from token treesFINALIZATION
Perform any last cleanupINITIALIZATION
source files are opened and environment configuredINSTRUCTION_SELECTION
instruction set is chosen, for example java5 or pre java5OUTPUT
write the binary output to the file systemPARSING
the grammar is used to to produce tree of tokens representing the source codeSEMANTIC_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 underlieng integer Phase number.static CompilePhase
valueOf(String name)
Returns the enum constant of this type with the specified name.static CompilePhase[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INITIALIZATION
source files are opened and environment configured -
PARSING
the grammar is used to to produce tree of tokens representing the source code -
CONVERSION
An abstract syntax tree (AST) is created from token trees -
SEMANTIC_ANALYSIS
Performs consistency and validity checks that the grammar can't check for, and resolves classes -
CANONICALIZATION
Complete building the AST -
INSTRUCTION_SELECTION
instruction set is chosen, for example java5 or pre java5 -
CLASS_GENERATION
creates the binary output in memory -
OUTPUT
write the binary output to the file system -
FINALIZATION
Perform any last cleanup
-
-
Field Details
-
phases
The phases as an array, with a null entry.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getPhaseNumber
public int getPhaseNumber()Returns the underlieng integer Phase number. -
fromPhaseNumber
Returns the CompilePhase for the given integer phase number.- Parameters:
phaseNumber
- the phase number- Returns:
- the CompilePhase or null if not found
-