Module jdk.compiler

Interface DocTree

所有已知的子接口:
AttributeTree, AuthorTree, BlockTagTree, CommentTree, DeprecatedTree, DocCommentTree, DocRootTree, DocTypeTree, EndElementTree, EntityTree, ErroneousTree, EscapeTree, HiddenTree, IdentifierTree, IndexTree, InheritDocTree, InlineTagTree, LinkTree, LiteralTree, ParamTree, ProvidesTree, ReferenceTree, ReturnTree, SeeTree, SerialDataTree, SerialFieldTree, SerialTree, SinceTree, SnippetTree, SpecTree, StartElementTree, SummaryTree, SystemPropertyTree, TextTree, ThrowsTree, UnknownBlockTagTree, UnknownInlineTagTree, UsesTree, ValueTree, VersionTree

public interface DocTree
所有文档语法树中节点的通用接口。
自Java版本:
1.8
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    枚举所有类型的树。
  • Method Summary

    Modifier and Type
    Method
    Description
    <R, D> R
    accept(DocTreeVisitor<R,D> visitor, D data)
    用于实现访问者模式的接受方法。
    返回此树的类型。
  • Method Details

    • getKind

      DocTree.Kind getKind()
      返回此树的类型。
      返回:
      此树的类型
    • accept

      <R, D> R accept(DocTreeVisitor<R,D> visitor, D data)
      用于实现访问者模式的接受方法。访问者模式用于在树上执行操作。
      类型参数:
      R - 此操作的结果类型
      D - 附加数据的类型
      参数:
      visitor - 要调用的访问者
      data - 要传递给访问者方法的参数值
      返回:
      从访问者方法返回的值