Enum Class ArgsDefinitionErrorCode

java.lang.Object
java.lang.Enum<ArgsDefinitionErrorCode>
dev.nipafx.args.ArgsDefinitionErrorCode
All Implemented Interfaces:
Serializable, Comparable<ArgsDefinitionErrorCode>, Constable

public enum ArgsDefinitionErrorCode extends Enum<ArgsDefinitionErrorCode>
Encodes various definition errors that the developer(s) using RecordArgs must fix.
  • Enum Constant Details

    • ILL_DEFINED_ARGS_TYPE

      public static final ArgsDefinitionErrorCode ILL_DEFINED_ARGS_TYPE
      An args types was neither a record nor a sealed interfaces with exclusively record implementations.
    • UNSUPPORTED_ARGUMENT_TYPE

      public static final ArgsDefinitionErrorCode UNSUPPORTED_ARGUMENT_TYPE
      An args record had an unsupported component type.
    • DUPLICATE_ARGUMENT_DEFINITION

      public static final ArgsDefinitionErrorCode DUPLICATE_ARGUMENT_DEFINITION
      Args::parse was called with at least two records that have components of the same name.
    • ILLEGAL_ACCESS

      public static final ArgsDefinitionErrorCode ILLEGAL_ACCESS
      RecordArgs has no reflective access to all args types.
    • FAULTY_STATIC_INITIALIZER

      public static final ArgsDefinitionErrorCode FAULTY_STATIC_INITIALIZER
      An args record's static initializer threw an error.
    • MULTIPLE_ACTIONS

      public static final ArgsDefinitionErrorCode MULTIPLE_ACTIONS
      At most one sealed interface may be called Action or ActionArgs.
  • Method Details

    • values

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