code: CodeWriter emitAndIndent(String s) throws IOException {
      boolean first = true;
      for (String line : s.split("\n", -1)) {
        // Emit a newline character. Make sure blank lines in Javadoc & comments look good.
        if (!first) {
          if ((javadoc || comment) && trailingNewline) {
            emitIndentation();
            out.append(javadoc ? " *" : "//");
          }
          out.append("\n");
          trailingNewline = true;
          if (statementLine != -1) {
            if (statementLine == 0) {
              indent(2); // Begin multiple-line statement. Increase the indentation level.
            }
            statementLine++;
          }
        }
  
        first = false;
        if (line.isEmpty()) continue; // Don't indent empty lines.
  
        // Emit indentation and comment prefix if necessary.
        if (trailingNewline) {
          emitIndentation();
          if (javadoc) {
            out.append(" * ");
          } else if (comment) {
            out.append("// ");
          }
        }
  
        out.append(line);
        trailingNewline = false;
      }
      return this;
    }
docs: Emits {@code s} with indentation as required. It's important that all code that writes to
  {@link #out} does it through here, since we emit indentation lazily in order to avoid
  unnecessary trailing whitespace.