com.sun.javadoc.Doc.setRawCommentText()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中com.sun.javadoc.Doc.setRawCommentText()方法的一些代码示例,展示了Doc.setRawCommentText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Doc.setRawCommentText()方法的具体详情如下:
包路径:com.sun.javadoc.Doc
类名称:Doc
方法名:setRawCommentText

Doc.setRawCommentText介绍

[英]Set the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.
[中]设置注释的完整未处理文本。标记包含为文本。主要用于存储和检索操作,如内部化。

代码示例

代码示例来源:origin: org.asciidoctor/asciidoclet

/**
 * Renders a generic document (class, field, method, etc)
 *
 * @param doc input
 */
@Override
public void renderDoc(Doc doc) {
  // hide text that looks like tags (such as annotations in source code) from Javadoc
  doc.setRawCommentText(doc.getRawCommentText().replaceAll("@([A-Z])", "{@literal @}$1"));
  StringBuilder buffer = new StringBuilder();
  buffer.append(render(doc.commentText(), false));
  buffer.append('\n');
  for (Tag tag : doc.tags()) {
    renderTag(tag, buffer);
    buffer.append('\n');
  }
  doc.setRawCommentText(buffer.toString());
}

代码示例来源:origin: io.atlassian.json-schemagen/json-schemagen-scanner

docForField.setRawCommentText(fieldDocOverrides.get(fieldDoc.name()));

代码示例来源:origin: ch.raffael.pegdown-doclet/pegdown-doclet

buf.append('\n');
doc.setRawCommentText(buf.toString());

相关文章