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

x33g5p2x  于2022-01-29 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(126)

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

Tag.firstSentenceTags介绍

[英]Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as a Tagof kind "Text". Inline tags are represented as a SeeTag of kind "@link". If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): "This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.", in addition a line will be terminated by paragraph and section terminating HTML tags: <p> </p> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <pre> or </pre>. If the locale is not English, the sentence end will be determined by BreakIterator#getSentenceInstance(Locale).
[中]以标签数组的形式返回注释的第一句话。包括内联标记(即{@link reference}标记),但不包括块标记。纯文本的每一部分都表示为一种“文本”。内联标签被表示为一个SeeTag类型的“@link”。如果语言环境是英语,则第一句话由Java语言规范(第一版)中描述的规则确定:“此句在第一个句点结束,后面是空白、制表符或行结束符,或在第一个标记行结束。”,此外,一行将以段落和节结尾HTML标记:<p><p><h1><h2><h3><h4><h5><h6><hr><pre>或</pre>。如果语言环境不是英语,句子的结尾将由BreakIterator#getSentenceInstance(语言环境)确定。

代码示例

代码示例来源: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: uk.org.retep.doclet/core

public void printSummaryDeprecatedComment( Doc doc, Tag tag )
{
  printCommentTags( doc, tag.firstSentenceTags(), true, true );
}

代码示例来源:origin: konsoletyper/teavm-javac

public void addSummaryDeprecatedComment(Doc doc, Tag tag, Content htmltree) {
  addCommentTags(doc, tag.firstSentenceTags(), true, true, 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: 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: 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

/**
 * {@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();
  }
}

相关文章