コード例 #1
0
 void generate() {
   if (rootDoc == null || outputdir == null) {
     return;
   }
   for (PackageDoc pd : rootDoc.specifiedPackages()) {
     // If -nodeprecated option is set and the package is marked as deprecated,
     // do not convert the package files to HTML.
     if (!(configuration.nodeprecated && utils.isDeprecated(pd))) convertPackage(pd, outputdir);
   }
   for (ClassDoc cd : rootDoc.specifiedClasses()) {
     // If -nodeprecated option is set and the class is marked as deprecated
     // or the containing package is deprecated, do not convert the
     // package files to HTML.
     if (!(configuration.nodeprecated
         && (utils.isDeprecated(cd) || utils.isDeprecated(cd.containingPackage()))))
       convertClass(cd, outputdir);
   }
 }
コード例 #2
0
 /**
  * Add the member summary for the given class.
  *
  * @param classDoc the class that is being documented
  * @param member the member being documented
  * @param firstSentenceTags the first sentence tags to be added to the summary
  * @param tableContents the list of contents to which the documentation will be added
  * @param counter the counter for determining id and style for the table row
  */
 public void addMemberSummary(
     ClassDoc classDoc,
     ProgramElementDoc member,
     Tag[] firstSentenceTags,
     List<Content> tableContents,
     int counter) {
   HtmlTree tdSummaryType = new HtmlTree(HtmlTag.TD);
   tdSummaryType.addStyle(HtmlStyle.colFirst);
   writer.addSummaryType(this, member, tdSummaryType);
   HtmlTree tdSummary = new HtmlTree(HtmlTag.TD);
   setSummaryColumnStyle(tdSummary);
   addSummaryLink(classDoc, member, tdSummary);
   writer.addSummaryLinkComment(this, member, firstSentenceTags, tdSummary);
   HtmlTree tr = HtmlTree.TR(tdSummaryType);
   tr.addContent(tdSummary);
   if (member instanceof MethodDoc && !member.isAnnotationTypeElement()) {
     int methodType =
         (member.isStatic()) ? MethodTypes.STATIC.value() : MethodTypes.INSTANCE.value();
     if (member.containingClass().isInterface()) {
       methodType =
           (((MethodDoc) member).isAbstract())
               ? methodType | MethodTypes.ABSTRACT.value()
               : methodType | MethodTypes.DEFAULT.value();
     } else {
       methodType =
           (((MethodDoc) member).isAbstract())
               ? methodType | MethodTypes.ABSTRACT.value()
               : methodType | MethodTypes.CONCRETE.value();
     }
     if (utils.isDeprecated(member) || utils.isDeprecated(classdoc)) {
       methodType = methodType | MethodTypes.DEPRECATED.value();
     }
     methodTypesOr = methodTypesOr | methodType;
     String tableId = "i" + counter;
     typeMap.put(tableId, methodType);
     tr.addAttr(HtmlAttr.ID, tableId);
   }
   if (counter % 2 == 0) tr.addStyle(HtmlStyle.altColor);
   else tr.addStyle(HtmlStyle.rowColor);
   tableContents.add(tr);
 }
コード例 #3
0
 /**
  * Convert the Classes in the given Package to an HTML.
  *
  * @param pd the Package to convert.
  * @param outputdir the name of the directory to output to.
  */
 public void convertPackage(PackageDoc pd, DocPath outputdir) {
   if (pd == null) {
     return;
   }
   for (ClassDoc cd : pd.allClasses()) {
     // If -nodeprecated option is set and the class is marked as deprecated,
     // do not convert the package files to HTML. We do not check for
     // containing package deprecation since it is already check in
     // the calling method above.
     if (!(configuration.nodeprecated && utils.isDeprecated(cd))) convertClass(cd, outputdir);
   }
 }