Enum CompilationMode

java.lang.Object
java.lang.Enum<CompilationMode>
io.github.ascopes.jct.compilers.CompilationMode
All Implemented Interfaces:
Serializable, Comparable<CompilationMode>

public enum CompilationMode extends Enum<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 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

      public static final CompilationMode 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

      public static CompilationMode[] 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 CompilationMode 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