Enum Class CompilationMode
- All Implemented Interfaces:
Serializable, Comparable<CompilationMode>, Constable
An enum representing the various types of compilation mode that a compiler can run under.
This corresponds to the -proc flag in the OpenJDK Javac implementation.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSkip compilation, but run any annotation processing that may be enabled.Run compilation and run the annotation processors, if configured.Run compilation, but skip any annotation processing that may run. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompilationModeReturns the enum constant of this class with the specified name.static CompilationMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMPILATION_AND_ANNOTATION_PROCESSING
Run compilation and run the annotation processors, if configured.Prior to Java 21, this is the default if no
-procflag is provided to the compiler.From Java 21 and onwards, this is equivalent to passing
-proc:fullto the compiler. -
COMPILATION_ONLY
Run compilation, but skip any annotation processing that may run.This corresponds to providing
-proc:nonein the OpenJDK Javac implementation. -
ANNOTATION_PROCESSING_ONLY
Skip compilation, but run any annotation processing that may be enabled.This corresponds to providing
-proc:onlyin the OpenJDK Javac implementation.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-