本文整理汇总了Java中net.winroad.wrdoclet.data.WRDoc类的典型用法代码示例。如果您正苦于以下问题:Java WRDoc类的具体用法?Java WRDoc怎么用?Java WRDoc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WRDoc类属于net.winroad.wrdoclet.data包,在下文中一共展示了WRDoc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startGeneration
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
/**
* Start the generation of files. Call generate methods in the individual
* writers, which will in turn genrate the documentation files. Call the
* TreeWriter generation first to ensure the Class Hierarchy is built first
* and then can be used in the later generation.
*
* @see com.sun.javadoc.RootDoc
*/
private void startGeneration(RootDoc root) throws Exception {
if (root.classes().length == 0) {
configuration.message.error("doclet.No_Public_Classes_To_Document");
return;
}
configuration.setOptions();
configuration.getDocletSpecificMsg().notice("doclet.build_version",
configuration.getDocletSpecificBuildDate());
WRDoc wrDoc = new WRDoc(configuration);
generateWRDocFiles(root, wrDoc);
configuration.tagletManager.printReport();
}
示例2: generateIndexFile
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
protected void generateIndexFile(RootDoc root, WRDoc wrDoc)
throws Exception {
List<String> tagList = new ArrayList<String>(wrDoc.getWRTags());
Collator cmp = Collator.getInstance(java.util.Locale.CHINA);
Collections.sort(tagList, cmp);
Map<String, Object> tagMap = new HashMap<String, Object>();
DocData bean = this.generateDocData(wrDoc);
Gson gson = new Gson();
tagMap.put("response", gson.toJson(bean));
tagMap.put("searchengine", this.configurationEx.searchengine);
this.configurationEx
.getWriterFactory()
.getFreemarkerWriter()
.generateHtmlFile("index.ftl", tagMap,
this.configurationEx.destDirName, null);
}
示例3: DubboDocBuilder
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public DubboDocBuilder(WRDoc wrDoc) {
super(wrDoc);
this.logger = LoggerFactory.getLogger(this.getClass());
dubboInterfaces = this.getDubboInterfaces();
try {
protocolMap = getDubboProtocols(((AbstractConfiguration) wrDoc
.getConfiguration()).dubboconfigpath);
} catch (Exception e) {
this.logger.error(e);
}
}
示例4: generateDocData
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
protected DocData generateDocData(WRDoc wrDoc) {
DocData result = new DocData();
List<String> tagList = new ArrayList<String>(wrDoc.getWRTags());
Collator cmp = Collator.getInstance(java.util.Locale.CHINA);
Collections.sort(tagList, cmp);
for (String tag : tagList) {
result.getFacet_counts()
.getFacet_fields()
.addTagField(tag, wrDoc.getTaggedOpenAPIs().get(tag).size());
Doc doc = new Doc();
doc.setTag(tag);
for (OpenAPI openAPI : wrDoc.getTaggedOpenAPIs().get(tag)) {
API api = new API();
api.setUrl(openAPI.getRequestMapping().getUrl());
api.setTooltip(openAPI.getRequestMapping().getTooltip());
api.setMethodType(openAPI.getRequestMapping().getMethodType());
String filename = generateWRAPIFileName(openAPI
.getRequestMapping().getContainerName(), openAPI
.getRequestMapping().getUrl(), openAPI
.getRequestMapping().getMethodType());
api.setFilepath(filename);
api.setBrief(openAPI.getBrief());
doc.getAPIs().add(api);
}
result.addDoc(doc);
}
return result;
}
示例5: generateWRDocFiles
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
@Override
public void generateWRDocFiles(RootDoc root, WRDoc wrDoc)
throws Exception {
if (this.configurationEx.noframe) {
this.generateWRNoFrameFile(root, wrDoc);
} else {
this.generateWRFrameFiles(root, wrDoc);
}
this.generatePackageFiles(root, wrDoc);
}
示例6: generateWRNoFrameFile
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
protected void generateWRNoFrameFile(RootDoc root, WRDoc wrDoc)
throws Exception {
Map<String, Map<String, List<OpenAPI>>> tagMap = new HashMap<String, Map<String, List<OpenAPI>>>();
tagMap.put("tagedOpenAPIs", wrDoc.getTaggedOpenAPIs());
this.configurationEx
.getWriterFactory()
.getFreemarkerWriter()
.generateHtmlFile("wrNoFrame.ftl", tagMap,
this.configurationEx.destDirName, "index.html");
this.generateCommonFiles(root);
}
示例7: generateWRDocFiles
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public abstract void generateWRDocFiles(RootDoc root, WRDoc wrDoc)
throws Exception;
示例8: MQDocBuilder
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public MQDocBuilder(WRDoc wrDoc) {
super(wrDoc);
}
示例9: AbstractServiceDocBuilder
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public AbstractServiceDocBuilder(WRDoc wrDoc) {
super(wrDoc);
}
示例10: AbstractDocBuilder
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public AbstractDocBuilder(WRDoc wrDoc) {
this.wrDoc = wrDoc;
this.logger = LoggerFactory.getLogger(this.getClass());
}
示例11: getWrDoc
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public WRDoc getWrDoc() {
return wrDoc;
}
示例12: setWrDoc
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public void setWrDoc(WRDoc wrDoc) {
this.wrDoc = wrDoc;
}
示例13: SOAPDocBuilder
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
public SOAPDocBuilder(WRDoc wrDoc) {
super(wrDoc);
}
示例14: generatePackageFiles
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的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");
}
}
}
示例15: generateWRFrameFiles
import net.winroad.wrdoclet.data.WRDoc; //导入依赖的package包/类
protected void generateWRFrameFiles(RootDoc root, WRDoc wrDoc)
throws Exception {
this.generateIndexFile(root, wrDoc);
this.generateWRAPIDetailFiles(root, wrDoc);
this.generateCommonFiles(root);
}