本文整理了Java中com.sun.javadoc.Doc.getRawCommentText()
方法的一些代码示例,展示了Doc.getRawCommentText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Doc.getRawCommentText()
方法的具体详情如下:
包路径:com.sun.javadoc.Doc
类名称:Doc
方法名:getRawCommentText
[英]Return 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: org.netbeans.modules/org-netbeans-modules-java-editor-base
writer.println(ts);
writer.println("----- Doc instance: -------------------------------------------------------"); // NOI18N
writer.printf("class: %s, toString: %s,\nraw text:'%s'\n", jdoc.getClass(), jdoc, jdoc.getRawCommentText());
writer.println("----- Stack trace: ---------------------------------------------"); // NOI18N
throwable.printStackTrace(writer);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-java-editor-base
/**
* Checks whether Doc instance matches to its token sequence representation.
* @param javadoc Doc instance of javadoc
* @param ts javadoc token sequence
* @return true if it is valid javadoc
*
* @see <a href="http://www.netbeans.org/issues/show_bug.cgi?id=139147">139147</a>
*/
public static boolean isInvalidDocInstance(Doc javadoc, TokenSequence<JavadocTokenId> ts) {
if (javadoc != null && javadoc.getRawCommentText().trim().length() == 0) {
if (!ts.isEmpty()) {
ts.moveStart();
return !(ts.moveNext() && isTokenOfEmptyJavadoc(ts.token()) && ts.moveNext() == false);
}
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!