private static void processOption(final CommandParserContext ctx, final Queue<String> tokens,
final CommandMetadata command, final String currentToken,
final boolean shortOption)
{
OptionMetadata option = command.getNamedOption(currentToken);
if (option.isBoolean())
{
String value = "true";
if (!tokens.isEmpty())
{
if (!shortOption)
{
tokens.remove();
}
String nextToken = tokens.peek();
if (!option.isFlagOnly() && (nextToken != null) && nextToken.matches("true|false"))
{
value = nextToken;
tokens.remove();
}
}