Enum Class CDialect

java.lang.Object
java.lang.Enum<CDialect>
dev.guillermo.gradle.language.c.CDialect
All Implemented Interfaces:
Serializable, Comparable<CDialect>, Constable

public enum CDialect extends Enum<CDialect>
Dialect of C
  • Enum Constant Details

    • DEFAULT_DIALECT

      public static final CDialect DEFAULT_DIALECT
      The default C dialect.
    • C90

      public static final CDialect C90
      The default C90 dialect.
    • C99

      public static final CDialect C99
      The default C99 dialect.
    • C11

      public static final CDialect C11
      The default C11 dialect.
    • C17

      public static final CDialect C17
      The default C17 dialect.
    • C23

      public static final CDialect C23
      The default C23 dialect.
  • Method Details

    • values

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

      public static CDialect valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • from

      public static Optional<CDialect> from(String dialect)
      Tries to convert a string into a valid dialect of C.
      Parameters:
      dialect - The string to convert
      Returns:
      An optional dialect of C.