示例#1
0
 /**
  * Generate the deprecated API list.
  *
  * @param deprapi list of deprecated API built already.
  */
 protected void generateDeprecatedListFile(DeprecatedAPIListBuilder deprapi) throws IOException {
   Content body = getHeader();
   body.addContent(getContentsList(deprapi));
   String memberTableSummary;
   String[] memberTableHeader = new String[1];
   HtmlTree div = new HtmlTree(HtmlTag.DIV);
   div.addStyle(HtmlStyle.contentContainer);
   for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) {
     if (deprapi.hasDocumentation(i)) {
       addAnchor(deprapi, i, div);
       memberTableSummary =
           configuration.getText(
               "doclet.Member_Table_Summary",
               configuration.getText(HEADING_KEYS[i]),
               configuration.getText(SUMMARY_KEYS[i]));
       memberTableHeader[0] =
           configuration.getText(
               "doclet.0_and_1",
               configuration.getText(HEADER_KEYS[i]),
               configuration.getText("doclet.Description"));
       writers[i].addDeprecatedAPI(
           deprapi.getList(i), HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
     }
   }
   body.addContent(div);
   addNavLinks(false, body);
   addBottom(body);
   printHtmlDocument(null, true, body);
 }
示例#2
0
 /**
  * Add the anchor.
  *
  * @param builder the deprecated list builder
  * @param type the type of list being documented
  * @param contentTree the content tree to which the anchor will be added
  */
 private void addAnchor(DeprecatedAPIListBuilder builder, int type, Content htmlTree) {
   if (builder.hasDocumentation(type)) {
     htmlTree.addContent(getMarkerAnchor(ANCHORS[type]));
   }
 }
示例#3
0
 /**
  * Add the index link.
  *
  * @param builder the deprecated list builder
  * @param type the type of list being documented
  * @param contentTree the content tree to which the index link will be added
  */
 private void addIndexLink(DeprecatedAPIListBuilder builder, int type, Content contentTree) {
   if (builder.hasDocumentation(type)) {
     Content li = HtmlTree.LI(getHyperLink("#" + ANCHORS[type], getResource(HEADING_KEYS[type])));
     contentTree.addContent(li);
   }
 }