當前位置: 首頁>>代碼示例>>Java>>正文


Java RootDoc.specifiedPackages方法代碼示例

本文整理匯總了Java中com.sun.javadoc.RootDoc.specifiedPackages方法的典型用法代碼示例。如果您正苦於以下問題:Java RootDoc.specifiedPackages方法的具體用法?Java RootDoc.specifiedPackages怎麽用?Java RootDoc.specifiedPackages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.sun.javadoc.RootDoc的用法示例。


在下文中一共展示了RootDoc.specifiedPackages方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: generatePackageFiles

import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
protected void generatePackageFiles(RootDoc root, WRDoc wrDoc) {
	PackageDoc[] packageDocs = root.specifiedPackages();
	for (PackageDoc pdoc : packageDocs) {
		if (StringUtils.isNotBlank(pdoc.commentText())) {
			String html = this.pegDownProcessor.markdownToHtml(pdoc
					.commentText());
			Map<String, String> tagMap = new HashMap<String, String>();
			tagMap.put("branchName", this.configurationEx.branchname);
			tagMap.put("systemName", this.configurationEx.systemname);
			String tags = WRTagTaglet.concatToString(pdoc
					.tags(WRTagTaglet.NAME));
			if (StringUtils.isBlank(tags)) {
				tagMap.put("tags", pdoc.name());
			} else {
				tagMap.put("tags", tags);
			}
			tagMap.put("APIUrl", pdoc.name());
			if (StringUtils.isWhitespace(this.configurationEx.buildid) || 
					this.configurationEx.buildid.equalsIgnoreCase("time")) {
				tagMap.put("buildID", wrDoc.getDocGeneratedTime());
			} else {
				tagMap.put("buildID", this.configurationEx.buildid);
			}
			this.logger.info("buildid:" + tagMap.get("buildID"));

			tagMap.put("bodyContent", html);
			
			Tag[] ts = pdoc.tags(WRTagTaglet.NAME);
			for(Tag t : ts) {
				if (!wrDoc.getTaggedOpenAPIs().containsKey(t.name())) {
					wrDoc.getTaggedOpenAPIs().put(t.name(),
							new LinkedList<OpenAPI>());
				}
			}
			
			this.configurationEx
					.getWriterFactory()
					.getFreemarkerWriter()
					.generateHtmlFile("packageInfo.ftl", tagMap,
							this.configurationEx.destDirName,
							pdoc.name() + ".html");
		}
	}
}
 
開發者ID:WinRoad-NET,項目名稱:htmldoclet4jdk8,代碼行數:45,代碼來源:HtmlDoclet.java

示例2: run

import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
private void run(RootDoc rootDoc)
{
   printHeader("Overview");

   printSubHeader("Specified Packages");

   PackageDoc[] specifiedPackages = rootDoc.specifiedPackages();
   Arrays.sort(specifiedPackages);
   for (int i=0; i<specifiedPackages.length; ++i) {
      out.println(specifiedPackages[i].name());
   }

   printSubHeader("Specified Classes");

   ClassDoc[] specifiedClasses = rootDoc.specifiedClasses();
   Arrays.sort(specifiedClasses);
   for (int i=0; i<specifiedClasses.length; ++i) {
      out.println(specifiedClasses[i].qualifiedTypeName());
   }
   printSubHeader("Classes");

   ClassDoc[] classes = rootDoc.classes();
   Arrays.sort(classes);
   for (int i=0; i<classes.length; ++i) {
      out.println(classes[i].qualifiedTypeName());
   }

   printHeader("Class Detail");

   for (int i=0; i<classes.length; ++i) {
      printSubHeader(classes[i].qualifiedTypeName());

      printTags(classes[i].firstSentenceTags());

      printSub2Header("Methods");

      MethodDoc[] methods = classes[i].methods();

      for (int j=0; j<methods.length; ++j) {
         out.println("name: \"" + methods[j].name() + "\"");
         out.println("signature: \"" + methods[j].signature() + "\"");
         out.println("modifiers: \"" + methods[j].modifiers() + "\"");
         out.print("throws: ");
         ClassDoc[] thrownExceptions = methods[j].thrownExceptions();
         for (int k=0; k<thrownExceptions.length; ++k) {
            if (k>0) { out.print(", "); }
            out.print(thrownExceptions[k].qualifiedTypeName());
         }
         out.println();
      }

      printSub2Header("Fields");

      FieldDoc[] fields = classes[i].fields();

      for (int j=0; j<fields.length; ++j) {
         out.println("name: \"" + fields[j].name() + "\"");
         out.println("modifiers: \"" + fields[j].modifiers() + "\"");
         out.println();
      }

      printSub2Header("Serializable Fields");

      FieldDoc[] sfields = classes[i].serializableFields();

      for (int j=0; j<sfields.length; ++j) {
         out.println("name: \"" + sfields[j].name() + "\"");
         out.println("modifiers: \"" + sfields[j].modifiers() + "\"");
         out.println();
      }
   }
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:73,代碼來源:DebugDoclet.java

示例3: run

import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
private void run(RootDoc rootDoc) 
{
   printHeader("Overview");

   printSubHeader("Specified Packages");

   PackageDoc[] specifiedPackages = rootDoc.specifiedPackages();
   Arrays.sort(specifiedPackages);
   for (int i=0; i<specifiedPackages.length; ++i) {
      out.println(specifiedPackages[i].name());
   }

   printSubHeader("Specified Classes");

   ClassDoc[] specifiedClasses = rootDoc.specifiedClasses();
   Arrays.sort(specifiedClasses);
   for (int i=0; i<specifiedClasses.length; ++i) {
      out.println(specifiedClasses[i].qualifiedTypeName());
   }
   printSubHeader("Classes");

   ClassDoc[] classes = rootDoc.classes();
   Arrays.sort(classes);
   for (int i=0; i<classes.length; ++i) {
      out.println(classes[i].qualifiedTypeName());
   }

   printHeader("Class Detail");

   for (int i=0; i<classes.length; ++i) {
      printSubHeader(classes[i].qualifiedTypeName());

      printTags(classes[i].firstSentenceTags());

      printSub2Header("Methods");

      MethodDoc[] methods = classes[i].methods();

      for (int j=0; j<methods.length; ++j) {
         out.println("name: \"" + methods[j].name() + "\"");
         out.println("signature: \"" + methods[j].signature() + "\"");
         out.println("modifiers: \"" + methods[j].modifiers() + "\"");
         out.print("throws: ");
         ClassDoc[] thrownExceptions = methods[j].thrownExceptions();
         for (int k=0; k<thrownExceptions.length; ++k) {
            if (k>0) { out.print(", "); }
            out.print(thrownExceptions[k].qualifiedTypeName());
         }
         out.println();
      }

      printSub2Header("Fields");

      FieldDoc[] fields = classes[i].fields();

      for (int j=0; j<fields.length; ++j) {
         out.println("name: \"" + fields[j].name() + "\"");
         out.println("modifiers: \"" + fields[j].modifiers() + "\"");
         out.println();
      }

      printSub2Header("Serializable Fields");

      FieldDoc[] sfields = classes[i].serializableFields();

      for (int j=0; j<sfields.length; ++j) {
         out.println("name: \"" + sfields[j].name() + "\"");
         out.println("modifiers: \"" + sfields[j].modifiers() + "\"");
         out.println();
      }
   }
}
 
開發者ID:nmldiegues,項目名稱:jvm-stm,代碼行數:73,代碼來源:DebugDoclet.java

示例4: getDocuments

import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
private void getDocuments(RootDoc root) {
    this.classes = root.classes();
    Arrays.sort(classes, new ToStringComparator<ClassDoc>());
    this.packages = root.specifiedPackages();
    Arrays.sort(packages, new ToStringComparator<PackageDoc>());
}
 
開發者ID:slipperyseal,項目名稱:atomicobjects,代碼行數:7,代碼來源:BonsaiDoc.java

示例5: generateClassFiles

import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
/**
 * Iterate through all classes and construct documentation for them.
 * 
 * @param root
 *            the RootDoc of source to document.
 * @param classtree
 *            the data structure representing the class tree.
 */
protected void generateClassFiles(RootDoc root, ClassTree classtree) {
	generateClassFiles(classtree);
	PackageDoc[] packages = root.specifiedPackages();
	for (int i = 0; i < packages.length; i++) {
		generateClassFiles(packages[i].allClasses(), classtree);
	}
}
 
開發者ID:WinRoad-NET,項目名稱:wrdocletbase,代碼行數:16,代碼來源:AbstractDoclet.java


注:本文中的com.sun.javadoc.RootDoc.specifiedPackages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。