Package nz.org.riskscape.picocli
Class CommandLine.UnmatchedArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
nz.org.riskscape.picocli.CommandLine.PicocliException
nz.org.riskscape.picocli.CommandLine.ParameterException
nz.org.riskscape.picocli.CommandLine.UnmatchedArgumentException
- All Implemented Interfaces:
Serializable
- Enclosing class:
- CommandLine
Exception indicating that a command line argument could not be mapped to any of the fields annotated with
CommandLine.Option
or CommandLine.Parameters
.- See Also:
-
Constructor Summary
ConstructorDescriptionUnmatchedArgumentException
(CommandLine commandLine, String msg) UnmatchedArgumentException
(CommandLine commandLine, List<String> args) UnmatchedArgumentException
(CommandLine commandLine, Stack<String> args) -
Method Summary
Modifier and TypeMethodDescriptionReturns suggested solutions if such solutions exist, otherwise returns an empty list.Returns the unmatched command line arguments.boolean
Returnstrue
if the first unmatched command line arguments resembles an option,false
otherwise.boolean
Returnstrue
and prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse
.boolean
printSuggestions
(PrintWriter writer) Returnstrue
and prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse
.static boolean
Returnstrue
and prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse
.static boolean
Returnstrue
and prints suggested solutions to the specified writer if such solutions exist, otherwise returnsfalse
.Methods inherited from class nz.org.riskscape.picocli.CommandLine.ParameterException
getArgSpec, getCommandLine, getValue
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnmatchedArgumentException
-
UnmatchedArgumentException
-
UnmatchedArgumentException
-
-
Method Details
-
printSuggestions
Returnstrue
and prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse
.- Since:
- 3.3.0
-
printSuggestions
Returnstrue
and prints suggested solutions to the specified writer if such solutions exist, otherwise returnsfalse
.- Since:
- 4.0
-
getUnmatched
Returns the unmatched command line arguments.- Since:
- 3.3.0
-
isUnknownOption
public boolean isUnknownOption()Returnstrue
if the first unmatched command line arguments resembles an option,false
otherwise.- Since:
- 3.3.0
-
printSuggestions
Returnstrue
and prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse
.- Since:
- 3.3.0
-
printSuggestions
Returnstrue
and prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse
.- Since:
- 4.0
-
getSuggestions
Returns suggested solutions if such solutions exist, otherwise returns an empty list.- Since:
- 3.3.0
-