CommentTree (Java SE 25 & JDK 25)
Description: declaration: module: jdk.compiler, package: com.sun.source.doctree, interface: CommentTree
Keywords: com.sun.source.doctree.CommentTree interface

# Interface CommentTree

All Superinterfaces:
  `DocTree`

public interface CommentTree extends DocTree
An embedded HTML comment.

       <!-- text -->

Since:
  1.8

- ## Nested Class Summary

  ### Nested classes/interfaces declared in interface DocTree

  `DocTree.Kind`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getBody()`
  Returns the text of the comment.

  ### Methods declared in interface DocTree

  `accept, getKind`

- ## Method Details

  - ### getBody

    String getBody()
    Returns the text of the comment.
    Returns:
      the comment text