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

# Interface InheritDocTree

All Superinterfaces:
  `DocTree, InlineTagTree`

public interface InheritDocTree extends InlineTagTree
A tree node for an `@inheritDoc` inline tag.

       {@inheritDoc}
       {@inheritDoc supertype}

API Note:
  There is no requirement that the comment containing the tag and the comment containing the inherited documentation should either be both Markdown comments or both traditional (not Markdown) comments.
Since:
  1.8

- ## Nested Class Summary

  ### Nested classes/interfaces declared in interface DocTree

  `DocTree.Kind`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default ReferenceTree`
  `getSupertype()`
  Returns the reference to a superclass or superinterface from which to inherit documentation, or `null` if no reference was provided.

  ### Methods declared in interface DocTree

  `accept, getKind`

  ### Methods declared in interface InlineTagTree

  `getTagName`

- ## Method Details

  - ### getSupertype

    default ReferenceTree getSupertype()
    Returns the reference to a superclass or superinterface from which to inherit documentation, or `null` if no reference was provided.
    Implementation Requirements:
      this implementation returns `null`.
    Returns:
      the reference to a superclass or superinterface from which to inherit documentation, or `null` if no reference was provided
    Since:
      22