private static void writeModule(final IonWriter writer, final WriteContext context, final IdeaModule ideaModule) throws IOException {
    writer.stepIn(IonType.STRUCT);
    writeString(writer, "name", ideaModule.getName());
    writeString(writer, "description", ideaModule.getDescription());
    writeString(writer, "jdkName", nullizeUnsupported(new Supplier<String>() {
      @Override
      public String get() {
        return ideaModule.getJdkName();
      }
    }));
    writeGradleProject(writer, "gradleProject", context, ideaModule.getGradleProject());
    writeCompilerOutput(writer, context, ideaModule.getCompilerOutput());
    writeContentRoots(writer, ideaModule.getContentRoots());
    writeJavaLanguageSettings(writer, context, nullizeUnsupported(new Supplier<IdeaJavaLanguageSettings>() {
      @Override
      public IdeaJavaLanguageSettings get() {
        return ideaModule.getJavaLanguageSettings();
      }
    }));
    writeDependencies(writer, context, ideaModule.getDependencies());
    writer.stepOut();
  }
private static void writeModule(final IonWriter writer, final WriteContext context, final IdeaModule ideaModule)