public static class CommandLine.UnmatchedArgumentException extends CommandLine.ParameterException
CommandLine.Option or CommandLine.Parameters.| Constructor and Description |
|---|
UnmatchedArgumentException(CommandLine commandLine,
List<String> args) |
UnmatchedArgumentException(CommandLine commandLine,
List<String> args,
String extraMsg) |
UnmatchedArgumentException(CommandLine commandLine,
Stack<String> args) |
UnmatchedArgumentException(CommandLine commandLine,
String msg) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getSuggestions()
Returns suggested solutions if such solutions exist, otherwise returns an empty list.
|
List<String> |
getUnmatched()
Returns the unmatched command line arguments.
|
boolean |
isUnknownOption()
Returns
true if the first unmatched command line arguments resembles an option, false otherwise. |
static boolean |
printSuggestions(CommandLine.ParameterException ex,
PrintStream out)
Returns
true and prints suggested solutions to the specified stream if such solutions exist, otherwise returns false. |
static boolean |
printSuggestions(CommandLine.ParameterException ex,
PrintWriter writer)
Returns
true and prints suggested solutions to the specified writer if such solutions exist, otherwise returns false. |
boolean |
printSuggestions(PrintStream out)
Returns
true and prints suggested solutions to the specified stream if such solutions exist, otherwise returns false. |
boolean |
printSuggestions(PrintWriter writer)
Returns
true and prints suggested solutions to the specified stream if such solutions exist, otherwise returns false. |
getArgSpec, getCommandLine, getValueaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic UnmatchedArgumentException(CommandLine commandLine, String msg)
public UnmatchedArgumentException(CommandLine commandLine, Stack<String> args)
public UnmatchedArgumentException(CommandLine commandLine, List<String> args)
public UnmatchedArgumentException(CommandLine commandLine, List<String> args, String extraMsg)
public static boolean printSuggestions(CommandLine.ParameterException ex, PrintStream out)
true and prints suggested solutions to the specified stream if such solutions exist, otherwise returns false.public static boolean printSuggestions(CommandLine.ParameterException ex, PrintWriter writer)
true and prints suggested solutions to the specified writer if such solutions exist, otherwise returns false.public List<String> getUnmatched()
public boolean isUnknownOption()
true if the first unmatched command line arguments resembles an option, false otherwise.public boolean printSuggestions(PrintStream out)
true and prints suggested solutions to the specified stream if such solutions exist, otherwise returns false.public boolean printSuggestions(PrintWriter writer)
true and prints suggested solutions to the specified stream if such solutions exist, otherwise returns false.