- All Known Subinterfaces:
ArgsMessage.ArgsErrorMessage,ArgsMessage.ArgsWarningMessage
- All Known Implementing Classes:
ArgsMessage.FailedConstruction,ArgsMessage.IllegalModeValue,ArgsMessage.IllegalValue,ArgsMessage.MissingAction,ArgsMessage.MissingArgument,ArgsMessage.MissingValue,ArgsMessage.UnexpectedValue,ArgsMessage.UnknownAction,ArgsMessage.UnknownArgument
public sealed interface ArgsMessage
permits ArgsMessage.ArgsWarningMessage, ArgsMessage.ArgsErrorMessage
A warning or error resulting from faulty command line arguments.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn error resulting from faulty command line arguments.static interfaceA warning resulting from faulty command line arguments.static final recordIndicates that an args record constructor threw an exception.static final recordIndicates that the value provided for the mode was unknown.static final recordIndicates that the value provided for the argument could not be parsed.static final recordIndicates that the argument array was empty and no action was selectedstatic final recordIndicates that a required (i.e.static final recordIndicates that a required (i.e.static final recordIndicates that, at that position in the argument array, an argument was expected but instead a value was encountered.static final recordIndicates that the first argument was not a known value for the action.static final recordIndicates that an argument couldn't be mapped to a record component. -
Method Summary
-
Method Details
-
toMessage
String toMessage()Returns a textual description of the warning/error that can be shown to the user.- Returns:
- a textual description of the warning/error
-
cause
If the warning/error was caused by an exception, it is returned.- Returns:
- the cause of the warning/error
-