commandLine.addOption(new
ParsedOption(active.getName(), active.getLongName(),
new OptionProperty(name, value), active.getType()));
active = null;
if(addedArgument)
throw new ArgumentParserException("An argument was given to an option that do not support it.");
}
else if(active != null && (!active.hasValue() || active.getValue() != null)) {
commandLine.addOption(new ParsedOption(active.getName(), active.getLongName(),
active.getValue(), active.getType()));
active = null;
if(addedArgument)
throw new ArgumentParserException("An argument was given to an option that do not support it.");
}
else if(active == null)
throw new OptionParserException("Option: "+parseLine+" is not a valid option for this command");
}
//name