# Interface DocCommentTree

All Superinterfaces:
  `DocTree`

public interface DocCommentTree extends DocTree
The top-level representation of a documentation comment.

       first-sentence body block-tags

Since:
  1.8

- ## Nested Class Summary

  ### Nested classes/interfaces declared in interface DocTree

  `DocTree.Kind`
  Modifier and Type
  Interface
  Description
  `static enum`
  `DocTree.Kind`
  Enumerates all kinds of trees.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<? extends DocTree>`
  `getBlockTags()`
  Returns the block tags for a documentation comment.
  `List<? extends DocTree>`
  `getBody()`
  Returns the body of a documentation comment, appearing after the first sentence, and before any block tags.
  `List<? extends DocTree>`
  `getFirstSentence()`
  Returns the first sentence of a documentation comment.
  `default List<? extends DocTree>`
  `getFullBody()`
  Returns the entire body of a documentation comment, appearing before any block tags, including the first sentence.
  `default List<? extends DocTree>`
  `getPostamble()`
  Returns a list of trees containing the content (if any) following the content of the documentation comment.
  `default List<? extends DocTree>`
  `getPreamble()`
  Returns a list of trees containing the content (if any) preceding the content of the documentation comment.

  ### Methods declared in interface DocTree

  `accept, getKind`
  Modifier and Type
  Method
  Description
  `<R,D> R`
  `accept(DocTreeVisitor<R,D> visitor, D data)`
  Accept method used to implement the visitor pattern.
  `DocTree.Kind`
  `getKind()`
  Returns the kind of this tree.

- ## Method Details

  - ### getFirstSentence

    List<? extends DocTree> getFirstSentence()
    Returns the first sentence of a documentation comment.
    Returns:
      the first sentence of a documentation comment

  - ### getFullBody

    default List<? extends DocTree> getFullBody()
    Returns the entire body of a documentation comment, appearing before any block tags, including the first sentence.
    Returns:
      body of a documentation comment first sentence inclusive
    Since:
      9

  - ### getBody

    List<? extends DocTree> getBody()
    Returns the body of a documentation comment, appearing after the first sentence, and before any block tags.
    Returns:
      the body of a documentation comment

  - ### getBlockTags

    List<? extends DocTree> getBlockTags()
    Returns the block tags for a documentation comment.
    Returns:
      the block tags of a documentation comment

  - ### getPreamble

    default List<? extends DocTree> getPreamble()
    Returns a list of trees containing the content (if any) preceding the content of the documentation comment. When the `DocCommentTree` has been read from a documentation comment in a Java source file, the list will be empty. When the `DocCommentTree` has been read from an HTML file, this represents the content from the beginning of the file up to and including the `<body>` tag.
    Implementation Requirements:
      This implementation returns an empty list.
    Returns:
      the list of trees
    Since:
      10

  - ### getPostamble

    default List<? extends DocTree> getPostamble()
    Returns a list of trees containing the content (if any) following the content of the documentation comment. When the `DocCommentTree` has been read from a documentation comment in a Java source file, the list will be empty. When `DocCommentTree` has been read from an HTML file, this represents the content from the `</body>` tag to the end of file.
    Implementation Requirements:
      This implementation returns an empty list.
    Returns:
      the list of trees
    Since:
      10