void complete() {
      if (completed) return;
      completed = true;
      CharSequence sourceCode = extractSourceCode();
      try {
        JavaFileObject sourceFile = key.originatingElement != null
            ? getFiler().createSourceFile(key.toString(), Delegated.unwrap(key.originatingElement))
            : getFiler().createSourceFile(key.toString());

        try (Writer writer = sourceFile.openWriter()) {
          writer.append(sourceCode);
          writer.flush();
        }
      } catch (FilerException ex) {
        if (identicalFileIsAlreadyGenerated(sourceCode)) {
          getMessager().printMessage(Kind.NOTE, "Regenerated file with the same content: " + key);
        } else {
          getMessager().printMessage(Kind.MANDATORY_WARNING,
              String.format(
                  "Generated source file name collision. Attempt to overwrite already generated file: %s, %s."
                      + " If this happens when using @Value.Immutable on same-named nested classes in the same package,"
                      + " use can use @Value.Enclosing annotation to provide some sort of namespacing",
                  key,
                  ex));
        }
      } catch (IOException ex) {
        throw Throwables.propagate(ex);
      } finally {
        key.originatingElement = null; //attempt to not drag any round elements
      }
    }
Pragma-like comment indicator just at beginning of the source file used to disable import
post-processing.
generator/src/org/immutables/generator/Output.java