code: public void compile(ModuleConfiguration configuration) {
          LOGGER.debug("Compiling module {}", configuration);
          FileReaderFactory fileReaderFactory = injector.getInstance(FileReaderFactory.class);
          Importer importer = injector.getInstance(Importer.class);
          CompilerRegistry registry = injector.getInstance(CompilerRegistry.class);
          ProtoCompiler compiler = registry.findCompiler(configuration.getGenerator());
          if (compiler == null) {
              throw new GeneratorException("Unknown template: %s | %s", configuration.getGenerator(), registry.availableCompilers());
          }
          FileReader fileReader = fileReaderFactory.create(configuration.getIncludePaths());
          Map<String, Proto> importedFiles = new HashMap<>();
          for (String path : configuration.getProtoFiles()) {
              LOGGER.info("Parse {}", path);
              ProtoContext context = importer.importFile(fileReader, path);
              Proto proto = context.getProto();
              importedFiles.put(path, proto);
          }
          ImmutableModule.Builder builder = ImmutableModule.builder();
          builder.name(configuration.getName());
          builder.output(configuration.getOutput());
          builder.options(configuration.getOptions());
          for (Proto proto : importedFiles.values()) {
              builder.addProtos(proto);
          }
          UsageIndex index = UsageIndex.build(importedFiles.values());
          builder.usageIndex(index);
          ImmutableModule module = builder.build();
          for (Proto proto : importedFiles.values()) {
              proto.setModule(module);
          }
          compiler.compile(module);
      }
docs: Compile module - parse source files and generate code using specified outputs.