else {
active.addProperty(name, value);
commandLine.addOption(active);
active = null;
if(addedArgument)
commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
}
}
}
else if(active != null && active.getValue() != null) {
if(!active.getEndsWithSeparator()) {
commandLine.addOption(active);
active = null;
}
}
else if(active != null && active.getOptionType().equals(OptionType.BOOLEAN) &&
(!active.hasValue() || active.getValue() != null)) {
active.addValue("true");
commandLine.addOption(active);
active = null;
if(addedArgument)
commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
}
else if(active == null)
commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
}
//name