Module jdk.compiler
Package com.sun.source.doctree

## Interface DocTreeVisitor<R,P>

- Type Parameters:
    `R` - the return type of this visitor's methods. Use `Void` for visitors that do not need to return results.
    `P` - the type of the additional parameter to this visitor's methods. Use `Void` for visitors that do not need an additional parameter.
  All Known Implementing Classes:
    `DocTreePathScanner`, `DocTreeScanner`, `SimpleDocTreeVisitor`

      public interface DocTreeVisitor<R,P>

  A visitor of trees, in the style of the visitor design pattern. Classes implementing this interface are used to operate on a tree when the kind of tree is unknown at compile time. When a visitor is passed to an tree's `accept` method, the `visitXyz` method most applicable to that tree is invoked.

  Classes implementing this interface may or may not throw a `NullPointerException` if the additional parameter `p` is `null`; see documentation of the implementing class for details.

  WARNING: It is possible that methods will be added to this interface to accommodate new, currently unknown, doc comment structures added to future versions of the Java™ programming language. Therefore, visitor classes directly implementing this interface may be source incompatible with future versions of the platform.

  Since:
    1.8

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `R` | `visitAttribute​(AttributeTree node, P p)` | Visits an AttributeTree node.
    `R` | `visitAuthor​(AuthorTree node, P p)` | Visits an AuthorTree node.
    `R` | `visitComment​(CommentTree node, P p)` | Visits a CommentTree node.
    `R` | `visitDeprecated​(DeprecatedTree node, P p)` | Visits a DeprecatedTree node.
    `R` | `visitDocComment​(DocCommentTree node, P p)` | Visits a DocCommentTree node.
    `R` | `visitDocRoot​(DocRootTree node, P p)` | Visits a DocRootTree node.
    `R` | `visitEndElement​(EndElementTree node, P p)` | Visits an EndElementTree node.
    `R` | `visitEntity​(EntityTree node, P p)` | Visits an EntityTree node.
    `R` | `visitErroneous​(ErroneousTree node, P p)` | Visits an ErroneousTree node.
    `R` | `visitHidden​(HiddenTree node, P p)` | Visits a HiddenTree node.
    `R` | `visitIdentifier​(IdentifierTree node, P p)` | Visits an IdentifierTree node.
    `R` | `visitIndex​(IndexTree node, P p)` | Visits an IndexTree node.
    `R` | `visitInheritDoc​(InheritDocTree node, P p)` | Visits an InheritDocTree node.
    `R` | `visitLink​(LinkTree node, P p)` | Visits a LinkTree node.
    `R` | `visitLiteral​(LiteralTree node, P p)` | Visits an LiteralTree node.
    `R` | `visitOther​(DocTree node, P p)` | Visits an unknown type of DocTree node.
    `R` | `visitParam​(ParamTree node, P p)` | Visits a ParamTree node.
    `R` | `visitProvides​(ProvidesTree node, P p)` | Visits a ProvidesTree node.
    `R` | `visitReference​(ReferenceTree node, P p)` | Visits a ReferenceTree node.
    `R` | `visitReturn​(ReturnTree node, P p)` | Visits a ReturnTree node.
    `R` | `visitSee​(SeeTree node, P p)` | Visits a SeeTree node.
    `R` | `visitSerial​(SerialTree node, P p)` | Visits a SerialTree node.
    `R` | `visitSerialData​(SerialDataTree node, P p)` | Visits a SerialDataTree node.
    `R` | `visitSerialField​(SerialFieldTree node, P p)` | Visits a SerialFieldTree node.
    `R` | `visitSince​(SinceTree node, P p)` | Visits a SinceTree node.
    `R` | `visitStartElement​(StartElementTree node, P p)` | Visits a StartElementTree node.
    `R` | `visitText​(TextTree node, P p)` | Visits a TextTree node.
    `R` | `visitThrows​(ThrowsTree node, P p)` | Visits a ThrowsTree node.
    `R` | `visitUnknownBlockTag​(UnknownBlockTagTree node, P p)` | Visits an UnknownBlockTagTree node.
    `R` | `visitUnknownInlineTag​(UnknownInlineTagTree node, P p)` | Visits an UnknownInlineTagTree node.
    `R` | `visitUses​(UsesTree node, P p)` | Visits a UsesTree node.
    `R` | `visitValue​(ValueTree node, P p)` | Visits a ValueTree node.
    `R` | `visitVersion​(VersionTree node, P p)` | Visits a VersionTreeTree node.

- - ### Method Detail

    - #### visitAttribute

          R visitAttribute​(AttributeTree node,
                           P p)

      Visits an AttributeTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitAuthor

          R visitAuthor​(AuthorTree node,
                        P p)

      Visits an AuthorTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitComment

          R visitComment​(CommentTree node,
                         P p)

      Visits a CommentTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitDeprecated

          R visitDeprecated​(DeprecatedTree node,
                            P p)

      Visits a DeprecatedTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitDocComment

          R visitDocComment​(DocCommentTree node,
                            P p)

      Visits a DocCommentTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitDocRoot

          R visitDocRoot​(DocRootTree node,
                         P p)

      Visits a DocRootTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitEndElement

          R visitEndElement​(EndElementTree node,
                            P p)

      Visits an EndElementTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitEntity

          R visitEntity​(EntityTree node,
                        P p)

      Visits an EntityTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitErroneous

          R visitErroneous​(ErroneousTree node,
                           P p)

      Visits an ErroneousTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitHidden

          R visitHidden​(HiddenTree node,
                        P p)

      Visits a HiddenTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitIdentifier

          R visitIdentifier​(IdentifierTree node,
                            P p)

      Visits an IdentifierTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitIndex

          R visitIndex​(IndexTree node,
                       P p)

      Visits an IndexTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitInheritDoc

          R visitInheritDoc​(InheritDocTree node,
                            P p)

      Visits an InheritDocTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitLink

          R visitLink​(LinkTree node,
                      P p)

      Visits a LinkTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitLiteral

          R visitLiteral​(LiteralTree node,
                         P p)

      Visits an LiteralTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitParam

          R visitParam​(ParamTree node,
                       P p)

      Visits a ParamTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitProvides

          R visitProvides​(ProvidesTree node,
                          P p)

      Visits a ProvidesTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitReference

          R visitReference​(ReferenceTree node,
                           P p)

      Visits a ReferenceTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitReturn

          R visitReturn​(ReturnTree node,
                        P p)

      Visits a ReturnTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitSee

          R visitSee​(SeeTree node,
                     P p)

      Visits a SeeTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitSerial

          R visitSerial​(SerialTree node,
                        P p)

      Visits a SerialTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitSerialData

          R visitSerialData​(SerialDataTree node,
                            P p)

      Visits a SerialDataTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitSerialField

          R visitSerialField​(SerialFieldTree node,
                             P p)

      Visits a SerialFieldTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitSince

          R visitSince​(SinceTree node,
                       P p)

      Visits a SinceTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitStartElement

          R visitStartElement​(StartElementTree node,
                              P p)

      Visits a StartElementTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitText

          R visitText​(TextTree node,
                      P p)

      Visits a TextTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitThrows

          R visitThrows​(ThrowsTree node,
                        P p)

      Visits a ThrowsTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitUnknownBlockTag

          R visitUnknownBlockTag​(UnknownBlockTagTree node,
                                 P p)

      Visits an UnknownBlockTagTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitUnknownInlineTag

          R visitUnknownInlineTag​(UnknownInlineTagTree node,
                                  P p)

      Visits an UnknownInlineTagTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitUses

          R visitUses​(UsesTree node,
                      P p)

      Visits a UsesTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitValue

          R visitValue​(ValueTree node,
                       P p)

      Visits a ValueTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitVersion

          R visitVersion​(VersionTree node,
                         P p)

      Visits a VersionTreeTree node.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value

    - #### visitOther

          R visitOther​(DocTree node,
                       P p)

      Visits an unknown type of DocTree node. This can occur if the set of tags evolves and new kinds of nodes are added to the `DocTree` hierarchy.
      Parameters:
        `node` - the node being visited
        `p` - a parameter value
      Returns:
        a result value