use of net.morimekta.providence.generator.GeneratorFactory in project providence by morimekta.
the class HelpOption method getGenerator.
private GeneratorFactory getGenerator(ArgumentList args) {
if (args.remaining() > 2) {
throw new ArgumentException("Only one help spec allowed");
}
if (args.remaining() == 2) {
String spec = args.get(1);
GeneratorFactory factory = generatorFactoryMap.get().get(spec.toLowerCase());
if (factory == null) {
throw new ArgumentException("Unknown output language " + spec);
}
return factory;
}
return null;
}
Aggregations