Enum CompilationMode
- All Implemented Interfaces:
Serializable
,Comparable<CompilationMode>
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
-
Enum Constant Summary
Enum 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 CompilationMode
Returns the enum constant of this type with the specified name.static CompilationMode[]
values()
Returns an array containing the constants of this enum type, 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
-proc
flag is provided to the compiler.From Java 21 and onwards, this is equivalent to passing
-proc:full
to the compiler. -
COMPILATION_ONLY
Run compilation, but skip any annotation processing that may run.This corresponds to providing
-proc:none
in the OpenJDK Javac implementation. -
ANNOTATION_PROCESSING_ONLY
Skip compilation, but run any annotation processing that may be enabled.This corresponds to providing
-proc:only
in the OpenJDK Javac implementation.
-
-
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
-