class Generator {

    public void generate() throws GeneratorException {
        try {
            SkillModel skillModel = skillModelSupplier.getSkillModel();
            if (!destdir.exists()) {
                destdir.mkdirs();
            }
            for (Locale locale : locales) {
                File out = getDestFile(locale.toLanguageTag() + ".json");
                writer.writeValue(out, renderer.render(skillModel, locale));
            }
        } catch (IOException | RuntimeException ex) {
            throw new GeneratorException(ex);
        }
    }

    public  Generator(SkillModelSupplier skillModelSupplier, File destdir, List<Locale> locales);
    public  Generator(ObjectWriter writer, SkillModelRenderer renderer, SkillModelSupplier skillModelSupplier, File destdir, List<Locale> locales);

}