Package picocli
Class CommandLine.UnmatchedArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
picocli.CommandLine.PicocliException
picocli.CommandLine.ParameterException
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFields inherited from class picocli.CommandLine.ParameterException
commandLine -
Constructor Summary
ConstructorsConstructorDescriptionUnmatchedArgumentException(CommandLine commandLine, String msg) UnmatchedArgumentException(CommandLine commandLine, List<String> args) UnmatchedArgumentException(CommandLine commandLine, List<String> args, String extraMsg) UnmatchedArgumentException(CommandLine commandLine, Stack<String> args) -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringdescribe(List<String> unmatch, CommandLine cmd) Returns suggested solutions if such solutions exist, otherwise returns an empty list.Returns the unmatched command line arguments.booleanReturnstrueif the first unmatched command line arguments resembles an option,falseotherwise.private static booleanisUnknownOption(List<String> unmatch, CommandLine cmd) prefixCommandName(List<String> suggestions) booleanReturnstrueand prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse.booleanprintSuggestions(PrintWriter writer) Returnstrueand prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse.static booleanReturnstrueand prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse.static booleanReturnstrueand prints suggested solutions to the specified writer if such solutions exist, otherwise returnsfalse.(package private) static StringquoteElements(List<String> list) private static StringstripErrorMessage(List<String> unmatched) Methods inherited from class picocli.CommandLine.ParameterException
getArgSpec, getCommandLine, getValueMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
unmatched
-
-
Constructor Details
-
UnmatchedArgumentException
-
UnmatchedArgumentException
-
UnmatchedArgumentException
-
UnmatchedArgumentException
-
-
Method Details
-
printSuggestions
Returnstrueand prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse.- Since:
- 3.3.0
-
printSuggestions
Returnstrueand 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
-
stripErrorMessage
-
isUnknownOption
public boolean isUnknownOption()Returnstrueif the first unmatched command line arguments resembles an option,falseotherwise.- Since:
- 3.3.0
-
printSuggestions
Returnstrueand prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse.- Since:
- 3.3.0
-
printSuggestions
Returnstrueand prints suggested solutions to the specified stream if such solutions exist, otherwise returnsfalse.- Since:
- 4.0
-
str
-
prefixCommandName
-
getSuggestions
Returns suggested solutions if such solutions exist, otherwise returns an empty list.- Since:
- 3.3.0
-
isUnknownOption
-
describe
-
quoteElements
-