/**
  * 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;
 }
 /**
  * Constructor to construct PackageFrameWriter object and to generate "package-frame.html" file in
  * the respective package directory. For example for package "java.lang" this will generate file
  * "package-frame.html" file in the "java/lang" directory. It will also create "java/lang"
  * directory in the current or the destination directory if it doesn't exist.
  *
  * @param configuration the configuration of the doclet.
  * @param packageDoc PackageDoc under consideration.
  */
 public PackageFrameWriter(ConfigurationImpl configuration, PackageDoc packageDoc)
     throws IOException {
   super(configuration, DocPath.forPackage(packageDoc).resolve(DocPaths.PACKAGE_FRAME));
   this.packageDoc = packageDoc;
   if (configuration.root.specifiedPackages().length == 0) {
     documentedClasses = new HashSet<ClassDoc>(Arrays.asList(configuration.root.classes()));
   }
 }
  /** {@inheritDoc} */
  public Content seeTagOutput(Doc holder, SeeTag[] seeTags) {
    ContentBuilder body = new ContentBuilder();
    if (seeTags.length > 0) {
      for (int i = 0; i < seeTags.length; ++i) {
        appendSeparatorIfNotEmpty(body);
        body.addContent(htmlWriter.seeTagToContent(seeTags[i]));
      }
    }
    if (holder.isField()
        && ((FieldDoc) holder).constantValue() != null
        && htmlWriter instanceof ClassWriterImpl) {
      // Automatically add link to constant values page for constant fields.
      appendSeparatorIfNotEmpty(body);
      DocPath constantsPath = htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
      String whichConstant =
          ((ClassWriterImpl) htmlWriter).getClassDoc().qualifiedName()
              + "."
              + ((FieldDoc) holder).name();
      DocLink link = constantsPath.fragment(whichConstant);
      body.addContent(
          htmlWriter.getHyperLink(
              link, new StringContent(configuration.getText("doclet.Constants_Summary"))));
    }
    if (holder.isClass() && ((ClassDoc) holder).isSerializable()) {
      // Automatically add link to serialized form page for serializable classes.
      if ((SerializedFormBuilder.serialInclude(holder)
          && SerializedFormBuilder.serialInclude(((ClassDoc) holder).containingPackage()))) {
        appendSeparatorIfNotEmpty(body);
        DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
        DocLink link = serialPath.fragment(((ClassDoc) holder).qualifiedName());
        body.addContent(
            htmlWriter.getHyperLink(
                link, new StringContent(configuration.getText("doclet.Serialized_Form"))));
      }
    }
    if (body.isEmpty()) return body;

    ContentBuilder result = new ContentBuilder();
    result.addContent(
        HtmlTree.DT(
            HtmlTree.SPAN(
                HtmlStyle.seeLabel, new StringContent(configuration.getText("doclet.See_Also")))));
    result.addContent(HtmlTree.DD(body));
    return result;
  }
 /**
  * @param annotationType the annotation type being documented.
  * @param prevType the previous class that was documented.
  * @param nextType the next class being documented.
  */
 public AnnotationTypeWriterImpl(
     ConfigurationImpl configuration,
     AnnotationTypeDoc annotationType,
     Type prevType,
     Type nextType)
     throws Exception {
   super(configuration, DocPath.forClass(annotationType));
   this.annotationType = annotationType;
   configuration.currentcd = annotationType.asClassDoc();
   this.prev = prevType;
   this.next = nextType;
 }
 /**
  * Constructor to construct ProfilePackageWriter object and to generate
  * "profilename-package-summary.html" file in the respective package directory. For example for
  * profile compact1 and package "java.lang" this will generate file
  * "compact1-package-summary.html" file in the "java/lang" directory. It will also create
  * "java/lang" directory in the current or the destination directory if it doesn't exist.
  *
  * @param configuration the configuration of the doclet.
  * @param packageDoc PackageDoc under consideration.
  * @param prev Previous package in the sorted array.
  * @param next Next package in the sorted array.
  * @param profile The profile being documented.
  */
 public ProfilePackageWriterImpl(
     ConfigurationImpl configuration,
     PackageDoc packageDoc,
     PackageDoc prev,
     PackageDoc next,
     Profile profile)
     throws IOException {
   super(
       configuration,
       DocPath.forPackage(packageDoc).resolve(DocPaths.profilePackageSummary(profile.name)));
   this.prev = prev;
   this.next = next;
   this.packageDoc = packageDoc;
   this.profileName = profile.name;
   this.profileValue = profile.value;
 }