当前位置: 首页>>代码示例>>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;未经允许,请勿转载。