code: public void addPackage(String packageName) throws IOException {
      if (this.packagePrefix != null) {
        throw new IllegalStateException();
      }
      out.write("package ");
      out.write(packageName);
      out.write(";\n");
      this.packagePrefix = packageName + ".";
    }
docs: Emit a package declaration.