/**
  * Get link to next class.
  *
  * @return a content tree for the next class link
  */
 public Content getNavLinkNext() {
   Content li;
   if (next != null) {
     Content nextLink =
         getLink(
             new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS, next.asClassDoc())
                 .label(nextclassLabel)
                 .strong(true));
     li = HtmlTree.LI(nextLink);
   } else li = HtmlTree.LI(nextclassLabel);
   return li;
 }
 /**
  * Get link to previous class.
  *
  * @return a content tree for the previous class link
  */
 public Content getNavLinkPrevious() {
   Content li;
   if (prev != null) {
     Content prevLink =
         getLink(
             new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS, prev.asClassDoc())
                 .label(prevclassLabel)
                 .strong(true));
     li = HtmlTree.LI(prevLink);
   } else li = HtmlTree.LI(prevclassLabel);
   return li;
 }
 /**
  * Add specific class kind listing. Also add label to the listing.
  *
  * @param arr Array of specific class kinds, namely Class or Interface or Exception or Error
  * @param labelContent content tree of the label to be added
  * @param contentTree the content tree to which the class kind listing will be added
  */
 protected void addClassKindListing(ClassDoc[] arr, Content labelContent, Content contentTree) {
   arr = Util.filterOutPrivateClasses(arr, configuration.javafx);
   if (arr.length > 0) {
     Arrays.sort(arr);
     boolean printedHeader = false;
     HtmlTree ul = new HtmlTree(HtmlTag.UL);
     ul.setTitle(labelContent);
     for (int i = 0; i < arr.length; i++) {
       if (documentedClasses != null && !documentedClasses.contains(arr[i])) {
         continue;
       }
       if (!Util.isCoreClass(arr[i]) || !configuration.isGeneratedDoc(arr[i])) {
         continue;
       }
       if (!printedHeader) {
         Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, labelContent);
         contentTree.addContent(heading);
         printedHeader = true;
       }
       Content arr_i_name = new StringContent(arr[i].name());
       if (arr[i].isInterface()) arr_i_name = HtmlTree.SPAN(HtmlStyle.interfaceName, arr_i_name);
       Content link =
           getLink(
               new LinkInfoImpl(configuration, LinkInfoImpl.Kind.PACKAGE_FRAME, arr[i])
                   .label(arr_i_name)
                   .target("classFrame"));
       Content li = HtmlTree.LI(link);
       ul.addContent(li);
     }
     contentTree.addContent(ul);
   }
 }
 /**
  * Get "NEXT PACKAGE" link in the navigation bar.
  *
  * @return a content tree for the next link
  */
 public Content getNavLinkNext() {
   Content li;
   if (next == null) {
     li = HtmlTree.LI(nextpackageLabel);
   } else {
     DocPath path = DocPath.relativePath(packageDoc, next);
     li =
         HtmlTree.LI(
             getHyperLink(
                 path.resolve(DocPaths.profilePackageSummary(profileName)),
                 nextpackageLabel,
                 "",
                 ""));
   }
   return li;
 }
 /**
  * Get summary links for navigation bar.
  *
  * @return the content tree for the navigation summary links
  */
 protected Content getNavSummaryLinks() throws Exception {
   Content li = HtmlTree.LI(summaryLabel);
   li.addContent(getSpace());
   Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
   MemberSummaryBuilder memberSummaryBuilder =
       (MemberSummaryBuilder) configuration.getBuilderFactory().getMemberSummaryBuilder(this);
   Content liNavField = new HtmlTree(HtmlTag.LI);
   addNavSummaryLink(
       memberSummaryBuilder,
       "doclet.navField",
       VisibleMemberMap.ANNOTATION_TYPE_FIELDS,
       liNavField);
   addNavGap(liNavField);
   ulNav.addContent(liNavField);
   Content liNavReq = new HtmlTree(HtmlTag.LI);
   addNavSummaryLink(
       memberSummaryBuilder,
       "doclet.navAnnotationTypeRequiredMember",
       VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED,
       liNavReq);
   addNavGap(liNavReq);
   ulNav.addContent(liNavReq);
   Content liNavOpt = new HtmlTree(HtmlTag.LI);
   addNavSummaryLink(
       memberSummaryBuilder,
       "doclet.navAnnotationTypeOptionalMember",
       VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL,
       liNavOpt);
   ulNav.addContent(liNavOpt);
   return ulNav;
 }
 /**
  * Get detail links for the navigation bar.
  *
  * @return the content tree for the detail links
  */
 protected Content getNavDetailLinks() throws Exception {
   Content li = HtmlTree.LI(detailLabel);
   li.addContent(getSpace());
   Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
   MemberSummaryBuilder memberSummaryBuilder =
       (MemberSummaryBuilder) configuration.getBuilderFactory().getMemberSummaryBuilder(this);
   AbstractMemberWriter writerField =
       ((AbstractMemberWriter)
           memberSummaryBuilder.getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_FIELDS));
   AbstractMemberWriter writerOptional =
       ((AbstractMemberWriter)
           memberSummaryBuilder.getMemberSummaryWriter(
               VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL));
   AbstractMemberWriter writerRequired =
       ((AbstractMemberWriter)
           memberSummaryBuilder.getMemberSummaryWriter(
               VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED));
   Content liNavField = new HtmlTree(HtmlTag.LI);
   if (writerField != null) {
     writerField.addNavDetailLink(annotationType.fields().length > 0, liNavField);
   } else {
     liNavField.addContent(getResource("doclet.navField"));
   }
   addNavGap(liNavField);
   ulNav.addContent(liNavField);
   if (writerOptional != null) {
     Content liNavOpt = new HtmlTree(HtmlTag.LI);
     writerOptional.addNavDetailLink(annotationType.elements().length > 0, liNavOpt);
     ulNav.addContent(liNavOpt);
   } else if (writerRequired != null) {
     Content liNavReq = new HtmlTree(HtmlTag.LI);
     writerRequired.addNavDetailLink(annotationType.elements().length > 0, liNavReq);
     ulNav.addContent(liNavReq);
   } else {
     Content liNav = HtmlTree.LI(getResource("doclet.navAnnotationTypeMember"));
     ulNav.addContent(liNav);
   }
   return ulNav;
 }
 /**
  * Highlight "Package" in the navigation bar, as this is the package page.
  *
  * @return a content tree for the package link
  */
 protected Content getNavLinkPackage() {
   Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, packageLabel);
   return li;
 }
 /**
  * Get "Tree" link in the navigation bar. This will be link to the package tree file.
  *
  * @return a content tree for the tree link
  */
 protected Content getNavLinkTree() {
   Content useLink = getHyperLink(DocPaths.PACKAGE_TREE, treeLabel, "", "");
   Content li = HtmlTree.LI(useLink);
   return li;
 }
 /**
  * Get "Use" link for this package in the navigation bar.
  *
  * @return a content tree for the class use link
  */
 protected Content getNavLinkClassUse() {
   Content useLink = getHyperLink(DocPaths.PACKAGE_USE, useLabel, "", "");
   Content li = HtmlTree.LI(useLink);
   return li;
 }
 /**
  * Get the index label for navigation bar.
  *
  * @return a content tree for the tree label
  */
 protected Content getNavLinkIndex() {
   Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, indexLabel);
   return li;
 }
 /**
  * Get this package link.
  *
  * @return a content tree for the package link
  */
 protected Content getNavLinkPackage() {
   Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY, packageLabel);
   Content li = HtmlTree.LI(linkContent);
   return li;
 }
 /**
  * Get the class use link.
  *
  * @return a content tree for the class use link
  */
 protected Content getNavLinkClassUse() {
   Content linkContent = getHyperLink(DocPaths.CLASS_USE.resolve(filename), useLabel);
   Content li = HtmlTree.LI(linkContent);
   return li;
 }
 /**
  * Get the class link.
  *
  * @return a content tree for the class link
  */
 protected Content getNavLinkClass() {
   Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, classLabel);
   return li;
 }