- Type Parameters:
R
- the return type of this visitor's methods. UseVoid
for visitors that do not need to return results.P
- the type of the additional parameter to this visitor's methods. UseVoid
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 a 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
Modifier and TypeMethodDescriptionvisitAttribute
(AttributeTree node, P p) Visits anAttributeTree
node.visitAuthor
(AuthorTree node, P p) Visits anAuthorTree
node.visitComment
(CommentTree node, P p) Visits aCommentTree
node.visitDeprecated
(DeprecatedTree node, P p) Visits aDeprecatedTree
node.visitDocComment
(DocCommentTree node, P p) Visits aDocCommentTree
node.visitDocRoot
(DocRootTree node, P p) Visits aDocRootTree
node.default R
visitDocType
(DocTypeTree node, P p) Visits aDocTypeTree
node.visitEndElement
(EndElementTree node, P p) Visits anEndElementTree
node.visitEntity
(EntityTree node, P p) Visits anEntityTree
node.visitErroneous
(ErroneousTree node, P p) Visits anErroneousTree
node.default R
visitHidden
(HiddenTree node, P p) Visits aHiddenTree
node.visitIdentifier
(IdentifierTree node, P p) Visits anIdentifierTree
node.default R
visitIndex
(IndexTree node, P p) Visits anIndexTree
node.visitInheritDoc
(InheritDocTree node, P p) Visits anInheritDocTree
node.Visits aLinkTree
node.visitLiteral
(LiteralTree node, P p) Visits anLiteralTree
node.visitOther
(DocTree node, P p) Visits an unknown type ofDocTree
node.visitParam
(ParamTree node, P p) Visits aParamTree
node.default R
visitProvides
(ProvidesTree node, P p) Visits aProvidesTree
node.visitReference
(ReferenceTree node, P p) Visits aReferenceTree
node.visitReturn
(ReturnTree node, P p) Visits aReturnTree
node.Visits aSeeTree
node.visitSerial
(SerialTree node, P p) Visits aSerialTree
node.visitSerialData
(SerialDataTree node, P p) Visits aSerialDataTree
node.visitSerialField
(SerialFieldTree node, P p) Visits aSerialFieldTree
node.visitSince
(SinceTree node, P p) Visits aSinceTree
node.default R
visitSnippet
(SnippetTree node, P p) Visits aSnippetTree
node.default R
Visits aSpecTree
node.visitStartElement
(StartElementTree node, P p) Visits aStartElementTree
node.default R
visitSummary
(SummaryTree node, P p) Visits aSummaryTree
node.default R
visitSystemProperty
(SystemPropertyTree node, P p) Visits aSystemPropertyTree
node.Visits aTextTree
node.visitThrows
(ThrowsTree node, P p) Visits aThrowsTree
node.visitUnknownBlockTag
(UnknownBlockTagTree node, P p) Visits anUnknownBlockTagTree
node.visitUnknownInlineTag
(UnknownInlineTagTree node, P p) Visits anUnknownInlineTagTree
node.default R
Visits aUsesTree
node.visitValue
(ValueTree node, P p) Visits aValueTree
node.visitVersion
(VersionTree node, P p) Visits aVersionTree
node.
-
Method Details
-
visitAttribute
Visits anAttributeTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitAuthor
Visits anAuthorTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitComment
Visits aCommentTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDeprecated
Visits aDeprecatedTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDocComment
Visits aDocCommentTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDocRoot
Visits aDocRootTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDocType
Visits aDocTypeTree
node.- Implementation Requirements:
- Visits the provided
DocTypeTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 10
-
visitEndElement
Visits anEndElementTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitEntity
Visits anEntityTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitErroneous
Visits anErroneousTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitHidden
Visits aHiddenTree
node.- Implementation Requirements:
- Visits the provided
HiddenTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 9
-
visitIdentifier
Visits anIdentifierTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitIndex
Visits anIndexTree
node.- Implementation Requirements:
- Visits the provided
IndexTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 9
-
visitInheritDoc
Visits anInheritDocTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitLink
Visits aLinkTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitLiteral
Visits anLiteralTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitParam
Visits aParamTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitProvides
Visits aProvidesTree
node.- Implementation Requirements:
- Visits the provided
ProvidesTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 9
-
visitReference
Visits aReferenceTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitReturn
Visits aReturnTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSee
Visits aSeeTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSerial
Visits aSerialTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSerialData
Visits aSerialDataTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSerialField
Visits aSerialFieldTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSince
Visits aSinceTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSnippet
Visits aSnippetTree
node.- Implementation Requirements:
- Visits the provided
SnippetTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 18
-
visitSpec
Visits aSpecTree
node.- Implementation Requirements:
- Visits the provided
SpecTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 20
-
visitStartElement
Visits aStartElementTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSummary
Visits aSummaryTree
node.- Implementation Requirements:
- Visits the provided
SummaryTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 10
-
visitSystemProperty
Visits aSystemPropertyTree
node.- Implementation Requirements:
- Visits the provided
SystemPropertyTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 12
-
visitText
Visits aTextTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitThrows
Visits aThrowsTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitUnknownBlockTag
Visits anUnknownBlockTagTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitUnknownInlineTag
Visits anUnknownInlineTagTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitUses
Visits aUsesTree
node.- Implementation Requirements:
- Visits a
UsesTree
node by callingvisitOther(node, p)
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
- Since:
- 9
-
visitValue
Visits aValueTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitVersion
Visits aVersionTree
node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitOther
Visits an unknown type ofDocTree
node. This can occur if the set of tags evolves and new kinds of nodes are added to theDocTree
hierarchy.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-