class ApplicationGenerator {

    public GeneratedFile generateApplicationDescriptor() {
        List<String> sections = generators.stream()
                .map(Generator::section)
                .filter(Objects::nonNull)
                .map(ApplicationSection::sectionClassName)
                .collect(Collectors.toList());

        applicationMainGenerator.withSections(sections);
        CompilationUnit compilationUnit = applicationMainGenerator.getCompilationUnitOrThrow();
        return new GeneratedFile(GeneratedFile.Type.APPLICATION,
                                 applicationMainGenerator.generatedFilePath(),
                                 log(compilationUnit.toString()).getBytes(StandardCharsets.UTF_8));
    }

    public  ApplicationGenerator(String packageName, File targetDirectory);

}