if (matchingOpts.isEmpty()) handleUnknownToken(currentToken); handleUnknownToken(currentToken);
/** * Handles the following tokens: * * --L * -L * --l * -l * * @param token the command line token to handle */ private void handleLongOptionWithoutEqual(String token) throws ParseException { List<String> matchingOpts = options.getMatchingOptions(token); if (matchingOpts.isEmpty()) { handleUnknownToken(currentToken); } else if (matchingOpts.size() > 1) { throw new AmbiguousOptionException(token, matchingOpts); } else { handleOption(options.getOption(matchingOpts.get(0))); } }
handleUnknownToken(stopAtNonOption && i > 1 ? token.substring(i) : token); break;
handleUnknownToken(token); handleUnknownToken(token);
/** * Handles the following tokens: * * --L * -L * --l * -l * * @param token the command line token to handle */ private void handleLongOptionWithoutEqual(String token) throws ParseException { List<String> matchingOpts = options.getMatchingOptions(token); if (matchingOpts.isEmpty()) { handleUnknownToken(currentToken); } else if (matchingOpts.size() > 1) { throw new AmbiguousOptionException(token, matchingOpts); } else { handleOption(options.getOption(matchingOpts.get(0))); } }
if (matchingOpts.isEmpty()) handleUnknownToken(currentToken); handleUnknownToken(currentToken);
handleUnknownToken(stopAtNonOption && i > 1 ? token.substring(i) : token); break;