int offset = t - args.length;
if (offset >= options.length) {
offset = offset - options.length;
if (offset >= flags.length) break;
Flag fla = flags[offset];
if (fla != null) {
if (type != boolean.class && type != Boolean.class)
throw new IllegalArgumentException("Invalid flag definition, can only be used on boolean types");
defs.add(fla.name());
this.addFlag(fla.name(), fla.value(), fla.defaultValue());
}
} else {
Option opt = options[offset];
defs.add(opt.name());
this.addOption(opt.name(), type, opt.desc(), opt.defaultDesc());