public void parse(InputSource xml, CmdLineParser parser, Object bean) {
try {
Config config = Config.parse(xml);
for(Config.ConfigElement ce : config.options) {
Option option = new OptionImpl(ce);
parser.addOption(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), option);
}
for (Config.ConfigElement ce : config.arguments) {
Argument argument = new ArgumentImpl(ce);
parser.addArgument(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), argument);