/**
  * Build the serialized form.
  *
  * @param node the XML element that specifies which components to document
  * @param serializedTree content tree to which the documentation will be added
  */
 public void buildSerializedForm(XMLNode node, Content serializedTree) throws Exception {
   serializedTree = writer.getHeader(configuration.getText("doclet.Serialized_Form"));
   buildChildren(node, serializedTree);
   writer.addFooter(serializedTree);
   writer.printDocument(serializedTree);
   writer.close();
 }
 /**
  * Build the serialized form summaries.
  *
  * @param node the XML element that specifies which components to document
  * @param serializedTree content tree to which the documentation will be added
  */
 public void buildSerializedFormSummaries(XMLNode node, Content serializedTree) {
   Content serializedSummariesTree = writer.getSerializedSummariesHeader();
   PackageDoc[] packages = configuration.packages;
   for (int i = 0; i < packages.length; i++) {
     currentPackage = packages[i];
     buildChildren(node, serializedSummariesTree);
   }
   serializedTree.addContent(writer.getSerializedContent(serializedSummariesTree));
 }
 /**
  * Build the serial UID information for the given class.
  *
  * @param node the XML element that specifies which components to document
  * @param classTree content tree to which the serial UID information will be added
  */
 public void buildSerialUIDInfo(XMLNode node, Content classTree) {
   Content serialUidTree = writer.getSerialUIDInfoHeader();
   FieldDoc[] fields = currentClass.fields(false);
   for (int i = 0; i < fields.length; i++) {
     if (fields[i].name().equals("serialVersionUID")
         && fields[i].constantValueExpression() != null) {
       writer.addSerialUIDInfo(
           SERIAL_VERSION_UID_HEADER, fields[i].constantValueExpression(), serialUidTree);
       break;
     }
   }
   classTree.addContent(serialUidTree);
 }
 /**
  * Build the class serialized form.
  *
  * @param node the XML element that specifies which components to document
  * @param packageSerializedTree content tree to which the documentation will be added
  */
 public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) {
   Content classSerializedTree = writer.getClassSerializedHeader();
   ClassDoc[] classes = currentPackage.allClasses(false);
   Arrays.sort(classes);
   for (int j = 0; j < classes.length; j++) {
     currentClass = classes[j];
     fieldWriter = writer.getSerialFieldWriter(currentClass);
     methodWriter = writer.getSerialMethodWriter(currentClass);
     if (currentClass.isClass() && currentClass.isSerializable()) {
       if (!serialClassInclude(currentClass)) {
         continue;
       }
       Content classTree = writer.getClassHeader(currentClass);
       buildChildren(node, classTree);
       classSerializedTree.addContent(classTree);
     }
   }
   packageSerializedTree.addContent(classSerializedTree);
 }
 /**
  * Build the package serialized form for the current package being processed.
  *
  * @param node the XML element that specifies which components to document
  * @param serializedSummariesTree content tree to which the documentation will be added
  */
 public void buildPackageSerializedForm(XMLNode node, Content serializedSummariesTree) {
   Content packageSerializedTree = writer.getPackageSerializedHeader();
   String foo = currentPackage.name();
   ClassDoc[] classes = currentPackage.allClasses(false);
   if (classes == null || classes.length == 0) {
     return;
   }
   if (!serialInclude(currentPackage)) {
     return;
   }
   if (!serialClassFoundToDocument(classes)) {
     return;
   }
   buildChildren(node, packageSerializedTree);
   serializedSummariesTree.addContent(packageSerializedTree);
 }
 /** Build the serialized form. */
 public void build() throws IOException {
   if (!serialClassFoundToDocument(configuration.root.classes())) {
     // Nothing to document.
     return;
   }
   try {
     writer = configuration.getWriterFactory().getSerializedFormWriter();
     if (writer == null) {
       // Doclet does not support this output.
       return;
     }
   } catch (Exception e) {
     throw new DocletAbortException(e);
   }
   build(layoutParser.parseXML(NAME), contentTree);
   writer.close();
 }
 /**
  * Build the summaries for the methods and fields.
  *
  * @param node the XML element that specifies which components to document
  * @param classTree content tree to which the documentation will be added
  */
 public void buildClassContent(XMLNode node, Content classTree) {
   Content classContentTree = writer.getClassContentHeader();
   buildChildren(node, classContentTree);
   classTree.addContent(classContentTree);
 }
 /**
  * Build the package header.
  *
  * @param node the XML element that specifies which components to document
  * @param packageSerializedTree content tree to which the documentation will be added
  */
 public void buildPackageHeader(XMLNode node, Content packageSerializedTree) {
   packageSerializedTree.addContent(writer.getPackageHeader(Util.getPackageName(currentPackage)));
 }