Module jdk.compiler

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 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
      • visitDocType

        default R visitDocType​(DocTypeTree node,
                               P p)
        Visits a DocTypeTree node.
        Implementation Requirements:
        Visits a DocTypeTree node by calling visitOther(node, p).
        Parameters:
        node - the node being visited
        p - a parameter value
        Returns:
        a result value
        Since:
        10
      • 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

        default R visitHidden​(HiddenTree node,
                              P p)
        Visits a HiddenTree node.
        Implementation Requirements:
        Visits a HiddenTree node by calling visitOther(node, p).
        Parameters:
        node - the node being visited
        p - a parameter value
        Returns:
        a result value
        Since:
        9
      • 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

        default R visitIndex​(IndexTree node,
                             P p)
        Visits an IndexTree node.
        Implementation Requirements:
        Visits an IndexTree node by calling visitOther(node, p).
        Parameters:
        node - the node being visited
        p - a parameter value
        Returns:
        a result value
        Since:
        9
      • 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

        default R visitProvides​(ProvidesTree node,
                                P p)
        Visits a ProvidesTree node.
        Implementation Requirements:
        Visits a ProvidesTree node by calling visitOther(node, p).
        Parameters:
        node - the node being visited
        p - a parameter value
        Returns:
        a result value
        Since:
        9
      • 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
      • visitSummary

        default R visitSummary​(SummaryTree node,
                               P p)
        Visits a SummaryTree node.
        Implementation Requirements:
        Visits a SummaryTree node by calling visitOther(node, p).
        Parameters:
        node - the node being visited
        p - a parameter value
        Returns:
        a result value
        Since:
        10
      • 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

        default R visitUses​(UsesTree node,
                            P p)
        Visits a UsesTree node.
        Implementation Requirements:
        Visits a UsesTree node by calling visitOther(node, p).
        Parameters:
        node - the node being visited
        p - a parameter value
        Returns:
        a result value
        Since:
        9
      • 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