use of org.eclipse.vorto.codegen.gateway.exception.GeneratorCreationException in project vorto by eclipse.
the class Generator method create.
public static Generator create(String configFile, Class<? extends IVortoCodeGenerator> generatorClass, IGeneratorConfigUITemplate configTemplate) {
Objects.requireNonNull(configFile);
Objects.requireNonNull(generatorClass);
Objects.requireNonNull(configTemplate);
try {
IVortoCodeGenerator instance = generatorClass.newInstance();
return new Generator(GatewayUtils.generatorInfoFromFile(configFile, instance), instance, configTemplate);
} catch (Exception e) {
throw new GeneratorCreationException("Error in instantiating Generator", e);
}
}
Aggregations