public static class CommandLine.ParameterException extends CommandLine.PicocliException
Modifier and Type | Field and Description |
---|---|
protected CommandLine |
commandLine |
Constructor and Description |
---|
ParameterException(CommandLine commandLine,
String msg)
Constructs a new ParameterException with the specified CommandLine and error message.
|
ParameterException(CommandLine commandLine,
String msg,
CommandLine.Model.ArgSpec argSpec,
String value)
Constructs a new ParameterException with the specified CommandLine and error message.
|
ParameterException(CommandLine commandLine,
String msg,
Throwable t)
Constructs a new ParameterException with the specified CommandLine and error message.
|
ParameterException(CommandLine commandLine,
String msg,
Throwable t,
CommandLine.Model.ArgSpec argSpec,
String value)
Constructs a new ParameterException with the specified CommandLine and error message.
|
Modifier and Type | Method and Description |
---|---|
CommandLine.Model.ArgSpec |
getArgSpec()
Returns the
ArgSpec object for the (sub)command whose input could not be parsed. |
CommandLine |
getCommandLine()
Returns the
CommandLine object for the (sub)command whose input could not be parsed. |
String |
getValue()
Returns the
String value for the (sub)command whose input could not be parsed. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
protected final CommandLine commandLine
public ParameterException(CommandLine commandLine, String msg)
commandLine
- the command or subcommand whose input was invalidmsg
- describes the problempublic ParameterException(CommandLine commandLine, String msg, Throwable t)
commandLine
- the command or subcommand whose input was invalidmsg
- describes the problemt
- the throwable that caused this ParameterExceptionpublic ParameterException(CommandLine commandLine, String msg, Throwable t, CommandLine.Model.ArgSpec argSpec, String value)
commandLine
- the command or subcommand whose input was invalidmsg
- describes the problemt
- the throwable that caused this ParameterExceptionargSpec
- the argSpec that caused this ParameterExceptionvalue
- the value that caused this ParameterExceptionpublic ParameterException(CommandLine commandLine, String msg, CommandLine.Model.ArgSpec argSpec, String value)
commandLine
- the command or subcommand whose input was invalidmsg
- describes the problemargSpec
- the argSpec that caused this ParameterExceptionvalue
- the value that caused this ParameterExceptionpublic CommandLine getCommandLine()
CommandLine
object for the (sub)command whose input could not be parsed.CommandLine
object for the (sub)command where parsing failed.public CommandLine.Model.ArgSpec getArgSpec()
ArgSpec
object for the (sub)command whose input could not be parsed.ArgSpec
object for the (sub)command where parsing failed.public String getValue()
String
value for the (sub)command whose input could not be parsed.String
value for the (sub)command where parsing failed.