code: public JavaWriter emitPackage(String packageName) throws IOException {
      if (this.packagePrefix != null) {
        throw new IllegalStateException();
      }
      if (packageName.isEmpty()) {
        this.packagePrefix = "";
      } else {
        out.write("package ");
        out.write(packageName);
        out.write(";\n\n");
        this.packagePrefix = packageName + ".";
      }
      return this;
    }
docs: Emit a package declaration and empty line.