/**
  * Add deprecated information to the documentation tree
  *
  * @param deprmembers list of deprecated members
  * @param headingKey the caption for the deprecated members table
  * @param tableSummary the summary for the deprecated members table
  * @param tableHeader table headers for the deprecated members table
  * @param contentTree the content tree to which the deprecated members table will be added
  */
 protected void addDeprecatedAPI(
     List<Doc> deprmembers,
     String headingKey,
     String tableSummary,
     String[] tableHeader,
     Content contentTree) {
   if (deprmembers.size() > 0) {
     Content caption = writer.getTableCaption(configuration.getResource(headingKey));
     Content table =
         (configuration.isOutputHtml5())
             ? HtmlTree.TABLE(HtmlStyle.deprecatedSummary, caption)
             : HtmlTree.TABLE(HtmlStyle.deprecatedSummary, tableSummary, caption);
     table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
     Content tbody = new HtmlTree(HtmlTag.TBODY);
     for (int i = 0; i < deprmembers.size(); i++) {
       ProgramElementDoc member = (ProgramElementDoc) deprmembers.get(i);
       HtmlTree td = HtmlTree.TD(HtmlStyle.colOne, getDeprecatedLink(member));
       if (member.tags("deprecated").length > 0)
         writer.addInlineDeprecatedComment(member, member.tags("deprecated")[0], td);
       HtmlTree tr = HtmlTree.TR(td);
       if (i % 2 == 0) tr.addStyle(HtmlStyle.altColor);
       else tr.addStyle(HtmlStyle.rowColor);
       tbody.addContent(tr);
     }
     table.addContent(tbody);
     Content li = HtmlTree.LI(HtmlStyle.blockList, table);
     Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
     contentTree.addContent(ul);
   }
 }
  /**
   * Build the comments for the method. Do nothing if {@link Configuration#nocomment} is set to
   * true.
   *
   * @param node the XML element that specifies which components to document
   * @param methodDocTree the content tree to which the documentation will be added
   */
  public void buildMethodComments(XMLNode node, Content methodDocTree) {
    if (!configuration.nocomment) {
      MethodDoc method = (MethodDoc) methods.get(currentMethodIndex);

      if (method.inlineTags().length == 0) {
        DocFinder.Output docs = DocFinder.search(configuration, new DocFinder.Input(method));
        method =
            docs.inlineTags != null && docs.inlineTags.length > 0
                ? (MethodDoc) docs.holder
                : method;
      }
      // NOTE:  When we fix the bug where ClassDoc.interfaceTypes() does
      //       not pass all implemented interfaces, holder will be the
      //       interface type.  For now, it is really the erasure.
      writer.addComments(method.containingClass(), method, methodDocTree);
    }
  }
 /**
  * Build the method documentation.
  *
  * @param node the XML element that specifies which components to document
  * @param memberDetailsTree the content tree to which the documentation will be added
  */
 public void buildMethodDoc(XMLNode node, Content memberDetailsTree) {
   if (writer == null) {
     return;
   }
   int size = methods.size();
   if (size > 0) {
     Content methodDetailsTree = writer.getMethodDetailsTreeHeader(classDoc, memberDetailsTree);
     for (currentMethodIndex = 0; currentMethodIndex < size; currentMethodIndex++) {
       Content methodDocTree =
           writer.getMethodDocTreeHeader(
               (MethodDoc) methods.get(currentMethodIndex), methodDetailsTree);
       buildChildren(node, methodDocTree);
       methodDetailsTree.addContent(
           writer.getMethodDoc(methodDocTree, (currentMethodIndex == size - 1)));
     }
     memberDetailsTree.addContent(writer.getMethodDetails(methodDetailsTree));
   }
 }
 /**
  * Build the field documentation.
  *
  * @param node the XML element that specifies which components to document
  * @param memberDetailsTree the content tree to which the documentation will be added
  */
 public void buildFieldDoc(XMLNode node, Content memberDetailsTree) {
   if (writer == null) {
     return;
   }
   int size = fields.size();
   if (size > 0) {
     Content fieldDetailsTree = writer.getFieldDetailsTreeHeader(classDoc, memberDetailsTree);
     for (currentFieldIndex = 0; currentFieldIndex < size; currentFieldIndex++) {
       Content fieldDocTree =
           writer.getFieldDocTreeHeader(
               (FieldDoc) fields.get(currentFieldIndex), fieldDetailsTree);
       buildChildren(node, fieldDocTree);
       fieldDetailsTree.addContent(
           writer.getFieldDoc(fieldDocTree, (currentFieldIndex == size - 1)));
     }
     memberDetailsTree.addContent(writer.getFieldDetails(fieldDetailsTree));
   }
 }
Beispiel #5
0
 /** Build the tag information. */
 public void buildTagInfo() {
   writer.writeTags((FieldDoc) enumConstants.get(currentEnumConstantsIndex));
 }
Beispiel #6
0
 /** Build the deprecation information. */
 public void buildDeprecationInfo() {
   writer.writeDeprecated((FieldDoc) fields.get(currentFieldIndex));
 }
Beispiel #7
0
 /** Build the deprecation information. */
 public void buildDeprecationInfo() {
   writer.writeDeprecated((FieldDoc) enumConstants.get(currentEnumConstantsIndex));
 }
Beispiel #8
0
 /**
  * Build the comments for the enum constant. Do nothing if {@link Configuration#nocomment} is set
  * to true.
  */
 public void buildEnumConstantComments() {
   if (!configuration.nocomment) {
     writer.writeComments((FieldDoc) enumConstants.get(currentEnumConstantsIndex));
   }
 }
Beispiel #9
0
 /** Build the header for the individual enum constants. */
 public void buildEnumConstantHeader() {
   writer.writeEnumConstantHeader(
       (FieldDoc) enumConstants.get(currentEnumConstantsIndex), currentEnumConstantsIndex == 0);
 }
Beispiel #10
0
 /** Build the signature. */
 public void buildSignature() {
   writer.writeSignature((FieldDoc) enumConstants.get(currentEnumConstantsIndex));
 }
 /**
  * Build the deprecation information.
  *
  * @param node the XML element that specifies which components to document
  * @param fieldDocTree the content tree to which the documentation will be added
  */
 public void buildDeprecationInfo(XMLNode node, Content fieldDocTree) {
   writer.addDeprecated((FieldDoc) fields.get(currentFieldIndex), fieldDocTree);
 }
 /**
  * Build the signature.
  *
  * @param node the XML element that specifies which components to document
  * @param fieldDocTree the content tree to which the documentation will be added
  */
 public void buildSignature(XMLNode node, Content fieldDocTree) {
   fieldDocTree.addContent(writer.getSignature((FieldDoc) fields.get(currentFieldIndex)));
 }
 /**
  * Build the signature.
  *
  * @param node the XML element that specifies which components to document
  * @param methodDocTree the content tree to which the documentation will be added
  */
 public void buildSignature(XMLNode node, Content methodDocTree) {
   methodDocTree.addContent(writer.getSignature((MethodDoc) methods.get(currentMethodIndex)));
 }
Beispiel #14
0
 /** Build the signature. */
 public void buildSignature() {
   writer.writeSignature((FieldDoc) fields.get(currentFieldIndex));
 }
Beispiel #15
0
 /** Build the header for the individual field. */
 public void buildFieldHeader() {
   writer.writeFieldHeader((FieldDoc) fields.get(currentFieldIndex), currentFieldIndex == 0);
 }
 /**
  * Build the comments for the field. Do nothing if {@link Configuration#nocomment} is set to true.
  *
  * @param node the XML element that specifies which components to document
  * @param fieldDocTree the content tree to which the documentation will be added
  */
 public void buildFieldComments(XMLNode node, Content fieldDocTree) {
   if (!configuration.nocomment) {
     writer.addComments((FieldDoc) fields.get(currentFieldIndex), fieldDocTree);
   }
 }
 /**
  * Build the tag information.
  *
  * @param node the XML element that specifies which components to document
  * @param fieldDocTree the content tree to which the documentation will be added
  */
 public void buildTagInfo(XMLNode node, Content fieldDocTree) {
   writer.addTags((FieldDoc) fields.get(currentFieldIndex), fieldDocTree);
 }
 /**
  * Build the deprecation information.
  *
  * @param node the XML element that specifies which components to document
  * @param methodDocTree the content tree to which the documentation will be added
  */
 public void buildDeprecationInfo(XMLNode node, Content methodDocTree) {
   writer.addDeprecated((MethodDoc) methods.get(currentMethodIndex), methodDocTree);
 }
Beispiel #19
0
 /**
  * Build the comments for the field. Do nothing if {@link Configuration#nocomment} is set to true.
  */
 public void buildFieldComments() {
   if (!configuration.nocomment) {
     writer.writeComments((FieldDoc) fields.get(currentFieldIndex));
   }
 }
 /**
  * Build the tag information.
  *
  * @param node the XML element that specifies which components to document
  * @param methodDocTree the content tree to which the documentation will be added
  */
 public void buildTagInfo(XMLNode node, Content methodDocTree) {
   writer.addTags((MethodDoc) methods.get(currentMethodIndex), methodDocTree);
 }
Beispiel #21
0
 /** Build the tag information. */
 public void buildTagInfo() {
   writer.writeTags((FieldDoc) fields.get(currentFieldIndex));
 }