本文整理了Java中com.sun.javadoc.Tag.inlineTags()
方法的一些代码示例,展示了Tag.inlineTags()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.inlineTags()
方法的具体详情如下:
包路径:com.sun.javadoc.Tag
类名称:Tag
方法名:inlineTags
[英]For a documentation comment with embedded {@link}
tags, return an array of Tag
objects. The entire doc comment is broken down into strings separated by {@link}
tags, where each successive element of the array represents either a string or {@link}
tag, in order, from start to end. Each string is represented by a Tag
object of name "Text", where #text() returns the string. Each {@link}
tag is represented by a SeeTag of name "@link" and kind "@see". For example, given the following comment tag:
This is a {@link Doc commentlabel} example.
return an array of Tag objects:
Doc
and label "commentlabel"{@link}
标记的文档注释,请返回Tag
对象数组。整个文档注释被分解成由{@link}
标记分隔的字符串,数组中的每个连续元素从头到尾依次表示一个字符串或{@link}
标记。每个字符串由名为“Text”的Tag
对象表示,其中#Text()返回字符串。每个{@link}
标记由一个名为“@link”和种类为“@see”的SeeTag表示。例如,给定以下注释标记:This is a {@link Doc commentlabel} example.
Doc
和标签“commentlabel”的SeeTag代码示例来源:origin: jersey/jersey
private static String print(final Tag tag) {
return String.valueOf(tag.getClass()) + "["
+ "firstSentenceTags=" + toCSV(tag.firstSentenceTags())
+ ", inlineTags=" + toCSV(tag.inlineTags())
+ ", kind=" + tag.kind()
+ ", name=" + tag.name()
+ ", text=" + tag.text()
+ "]";
}
代码示例来源:origin: jersey/jersey
final Tag[] inlineTags = tag.inlineTags();
if (inlineTags != null && inlineTags.length > 0) {
for (final Tag inlineTag : inlineTags) {
代码示例来源:origin: jersey/jersey
for (final Tag inlineTag : responseParamTag.inlineTags()) {
final String tagName = inlineTag.name();
final String tagText = inlineTag.text();
代码示例来源:origin: konsoletyper/teavm-javac
/**
* Add the inline deprecated comment.
*
* @param doc the doc for which the inline deprecated comment will be added
* @param tag the inline tag to be added
* @param htmltree the content tree to which the comment will be added
*/
public void addInlineDeprecatedComment(Doc doc, Tag tag, Content htmltree) {
addCommentTags(doc, tag.inlineTags(), true, false, htmltree);
}
代码示例来源:origin: uk.org.retep.doclet/core
public void printInlineDeprecatedComment( Doc doc, Tag tag )
{
printCommentTags( doc, tag.inlineTags(), true, false );
}
代码示例来源:origin: uk.org.retep.doclet/core
public void printInlineComment( Doc doc, Tag tag )
{
printCommentTags( doc, tag.inlineTags(), false, false );
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* Add the inline comment.
*
* @param doc the doc for which the inline comment will be added
* @param tag the inline tag to be added
* @param htmltree the content tree to which the comment will be added
*/
public void addInlineComment(Doc doc, Tag tag, Content htmltree) {
addCommentTags(doc, tag, tag.inlineTags(), false, false, htmltree);
}
代码示例来源:origin: com.atlassian.jersey/atlassian-jersey-restdoc
private static String print( Tag tag ) {
final StringBuilder sb = new StringBuilder();
sb.append( tag.getClass() ).append( "[" );
sb.append( "firstSentenceTags=" ).append( toCSV( tag.firstSentenceTags() ) );
sb.append( ", inlineTags=" ).append( toCSV( tag.inlineTags() ) );
sb.append( ", kind=" ).append( tag.kind() );
sb.append( ", name=" ).append( tag.name() );
sb.append( ", text=" ).append( tag.text() );
sb.append( "]" );
return sb.toString();
}
代码示例来源:origin: uk.org.retep.doclet/core
/**
* {@inheritDoc}
*/
public void inherit(DocFinder.Input input, DocFinder.Output output) {
Tag[] tags = input.method.tags("return");
if (tags.length > 0) {
output.holder = input.method;
output.holderTag = tags[0];
output.inlineTags = input.isFirstSentence ?
tags[0].firstSentenceTags() : tags[0].inlineTags();
}
}
代码示例来源:origin: uk.org.retep.doclet/core
/**
* {@inheritDoc}
*/
public void inherit(DocFinder.Input input, DocFinder.Output output) {
Tag[] tags = input.method.seeTags();
if (tags.length > 0) {
output.holder = input.method;
output.holderTag = tags[0];
output.inlineTags = input.isFirstSentence ?
tags[0].firstSentenceTags() : tags[0].inlineTags();
}
}
代码示例来源:origin: konsoletyper/teavm-javac
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
Tag[] tags = input.element.tags(tagName);
if (tags.length > 0) {
output.holder = input.element;
output.holderTag = tags[0];
output.inlineTags = input.isFirstSentence
? tags[0].firstSentenceTags() : tags[0].inlineTags();
}
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* {@inheritDoc}
*/
public void inherit(DocFinder.Input input, DocFinder.Output output) {
Tag[] tags = input.element.seeTags();
if (tags.length > 0) {
output.holder = input.element;
output.holderTag = tags[0];
output.inlineTags = input.isFirstSentence ?
tags[0].firstSentenceTags() : tags[0].inlineTags();
}
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* {@inheritDoc}
*/
public void inherit(DocFinder.Input input, DocFinder.Output output) {
Tag[] tags = input.element.tags("return");
if (tags.length > 0) {
output.holder = input.element;
output.holderTag = tags[0];
output.inlineTags = input.isFirstSentence ?
tags[0].firstSentenceTags() : tags[0].inlineTags();
}
}
代码示例来源:origin: de.unkrig.commons/commons-doclet
/**
* Verifies that the named block tag exists at most <b>once</b>, replaces line breaks with spaces, and convert
* its text to HTML.
*
* @return {@code null} iff the tag does not exist
*/
@Nullable public String
optionalTag(Doc doc, String tagName, RootDoc rootDoc) throws Longjump {
Tag t = Tags.optionalTag(doc, tagName, rootDoc);
if (t == null) return null;
return this.fromTags(t.inlineTags(), doc, rootDoc);
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* Verifies that the named block tag exists at most <b>once</b>, replaces line breaks with spaces, and convert
* its text to HTML.
*
* @return {@code null} iff the tag does not exist
*/
@Nullable public String
optionalTag(Doc doc, String tagName, RootDoc rootDoc) throws Longjump {
Tag t = Tags.optionalTag(doc, tagName, rootDoc);
if (t == null) return null;
return this.fromTags(t.inlineTags(), doc, rootDoc);
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* {@inheritDoc}
*/
public Content simpleTagOutput(Tag simpleTag, String header) {
ContentBuilder result = new ContentBuilder();
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
Content body = htmlWriter.commentTagsToContent(
simpleTag, null, simpleTag.inlineTags(), false);
result.addContent(HtmlTree.DD(body));
return result;
}
代码示例来源:origin: uk.org.retep.doclet/core
/**
* {@inheritDoc}
*/
public TagletOutput simpleTagOutput( Tag simpleTag, String header )
{
TagletOutputImpl result = new TagletOutputImpl();
result.append( DT_STRONG );
result.append( header );
result.append( DT_STRONG_CLOSE ).append( DD );
result.append( htmlWriter.commentTagsToString( simpleTag, null,
simpleTag.inlineTags(),
false ) );
return result.append( DD_CLOSE );
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* {@inheritDoc}
*/
public Content returnTagOutput(Tag returnTag) {
ContentBuilder result = new ContentBuilder();
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
new StringContent(configuration.getText("doclet.Returns")))));
result.addContent(HtmlTree.DD(htmlWriter.commentTagsToContent(
returnTag, null, returnTag.inlineTags(), false)));
return result;
}
代码示例来源:origin: uk.org.retep.doclet/core
/**
* {@inheritDoc}
*/
public TagletOutput returnTagOutput( Tag returnTag )
{
final TagletOutputImpl result = new TagletOutputImpl();
result.append( DT_STRONG );
result.append( htmlWriter.configuration.getText( "doclet.Returns" ) );
result.append( DT_STRONG_CLOSE ).append( DD );
result.append( htmlWriter.commentTagsToString( returnTag, null,
returnTag.inlineTags(),
false ) );
return result.append( DD_CLOSE );
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* {@inheritDoc}
*/
public Content simpleTagOutput(Tag[] simpleTags, String header) {
ContentBuilder result = new ContentBuilder();
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
ContentBuilder body = new ContentBuilder();
for (int i = 0; i < simpleTags.length; i++) {
if (i > 0) {
body.addContent(", ");
}
body.addContent(htmlWriter.commentTagsToContent(
simpleTags[i], null, simpleTags[i].inlineTags(), false));
}
result.addContent(HtmlTree.DD(body));
return result;
}
内容来源于网络,如有侵权,请联系作者删除!