Enum Class ErrorMessageKey

java.lang.Object
java.lang.Enum<ErrorMessageKey>
com.winterhavenmc.library.messagebuilder.validation.ErrorMessageKey
All Implemented Interfaces:
Serializable, Comparable<ErrorMessageKey>, Constable

public enum ErrorMessageKey extends Enum<ErrorMessageKey>
Enumeration of structured keys used to identify localized error messages for validation and configuration-related exceptions.

These keys correspond to entries in a ResourceBundle, allowing the library to provide translatable, context-aware messages to plugin users and administrators.

Typically used in conjunction with ValidationException and Validator.formatMessage(ErrorMessageKey, Parameter).

Example key in the language file: PARAMETER_NULL=Parameter {0} must not be null.

See Also:
  • Enum Constant Details

    • INVALID_SECTION

      public static final ErrorMessageKey INVALID_SECTION
      Indicates that a required configuration section is invalid or missing.
    • MISSING_LANGUAGE_FILE

      public static final ErrorMessageKey MISSING_LANGUAGE_FILE
      Indicates that a language file could not be found for the configured locale.
    • MISSING_LANGUAGE_RESOURCE

      public static final ErrorMessageKey MISSING_LANGUAGE_RESOURCE
      Indicates that a required language resource file is missing from the plugin jar.
    • MISSING_RESOURCE

      public static final ErrorMessageKey MISSING_RESOURCE
      Indicates a general failure to locate a required resource.
    • PARAMETER_INVALID

      public static final ErrorMessageKey PARAMETER_INVALID
      Indicates that a parameter failed validation, but no specific cause is given.
    • PARAMETER_NULL

      public static final ErrorMessageKey PARAMETER_NULL
      Indicates that a required parameter was null.
    • PARAMETER_TYPE_MISMATCH

      public static final ErrorMessageKey PARAMETER_TYPE_MISMATCH
      Indicates that a parameter was of the wrong type.
    • RELOAD_FAILED

      public static final ErrorMessageKey RELOAD_FAILED
      Indicates that a configuration reload operation failed.
    • STRING_BLANK

      public static final ErrorMessageKey STRING_BLANK
      Indicates that a provided string was blank (empty or only whitespace).
  • Method Details

    • values

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