Enum Class MessageRecord.Field

java.lang.Object
java.lang.Enum<MessageRecord.Field>
com.winterhavenmc.library.messagebuilder.model.language.MessageRecord.Field
All Implemented Interfaces:
Serializable, Comparable<MessageRecord.Field>, Constable
Enclosing interface:
MessageRecord

public static enum MessageRecord.Field extends Enum<MessageRecord.Field>
Enum representing the fields defined in a ValidMessageRecord.

Each constant in this enum maps to a specific key in the YAML configuration. This enum provides a single source of truth for these keys, which may be decoupled from the enum constant names in the future.

This design ensures central schema management and supports future extensions such as metadata annotations or type hints per field.

  • Enum Constant Details

  • Method Details

    • values

      public static MessageRecord.Field[] 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 MessageRecord.Field 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
    • toKey

      public String toKey()
      Returns the raw YAML key string associated with this field.
      Returns:
      the field key string