private boolean identicalFileIsAlreadyGenerated(CharSequence sourceCode) {
      try {
        String packagePath = !key.packageName.isEmpty() ? (key.packageName.replace('.', '/') + '/') : "";
        String filename = key.relativeName + ".java";
        FileObject resource = getFiler().getResource(StandardLocation.SOURCE_OUTPUT, "", packagePath + filename);

        String existingContent;
        try (Reader r = resource.openReader(true)) {
          existingContent = CharStreams.toString(r);
        }

        if (existingContent.contentEquals(sourceCode)) {
          // We are ok, for some reason the same file is already generated,
          // happens in Eclipse for example.
          return true;
        }
      } catch (Exception ignoredAttemptToGetExistingFile) {
        // we have some other problem, not an existing file
      }
      return false;
    }
Pragma-like comment indicator just at beginning of the source file used to disable import
post-processing.
generator/src/org/immutables/generator/Output.java