Package org.tomlj

Enum Class TomlBindOptions.KeyNaming

java.lang.Object
java.lang.Enum<TomlBindOptions.KeyNaming>
org.tomlj.TomlBindOptions.KeyNaming
All Implemented Interfaces:
Serializable, Comparable<TomlBindOptions.KeyNaming>, Constable
Enclosing class:
TomlBindOptions

public static enum TomlBindOptions.KeyNaming extends Enum<TomlBindOptions.KeyNaming>
How the name of a field or record component is turned into a TOML key.

A TomlName annotation on the field or component overrides the key naming.

  • Enum Constant Details

    • EXACT

      public static final TomlBindOptions.KeyNaming EXACT
      The key is the name, unchanged: maxConnections is bound to maxConnections.
    • SNAKE_CASE

      public static final TomlBindOptions.KeyNaming SNAKE_CASE
      The words of the name, in lower case, joined by _: maxConnections is bound to max_connections, and httpURL to http_url.
    • KEBAB_CASE

      public static final TomlBindOptions.KeyNaming KEBAB_CASE
      The words of the name, in lower case, joined by -: maxConnections is bound to max-connections, and httpURL to http-url.
  • Method Details

    • values

      public static TomlBindOptions.KeyNaming[] 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 TomlBindOptions.KeyNaming 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