- 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 an AttributeTree node.visitAuthor
(AuthorTree node, P p) Visits an AuthorTree node.visitComment
(CommentTree node, P p) Visits a CommentTree node.visitDeprecated
(DeprecatedTree node, P p) Visits a DeprecatedTree node.visitDocComment
(DocCommentTree node, P p) Visits a DocCommentTree node.visitDocRoot
(DocRootTree node, P p) Visits a DocRootTree node.default R
visitDocType
(DocTypeTree node, P p) Visits a DocTypeTree node.visitEndElement
(EndElementTree node, P p) Visits an EndElementTree node.visitEntity
(EntityTree node, P p) Visits an EntityTree node.visitErroneous
(ErroneousTree node, P p) Visits an ErroneousTree node.default R
visitHidden
(HiddenTree node, P p) Visits a HiddenTree node.visitIdentifier
(IdentifierTree node, P p) Visits an IdentifierTree node.default R
visitIndex
(IndexTree node, P p) Visits an IndexTree node.visitInheritDoc
(InheritDocTree node, P p) Visits an InheritDocTree node.Visits a LinkTree node.visitLiteral
(LiteralTree node, P p) Visits an LiteralTree node.visitOther
(DocTree node, P p) Visits an unknown type of DocTree node.visitParam
(ParamTree node, P p) Visits a ParamTree node.default R
visitProvides
(ProvidesTree node, P p) Visits a ProvidesTree node.visitReference
(ReferenceTree node, P p) Visits a ReferenceTree node.visitReturn
(ReturnTree node, P p) Visits a ReturnTree node.Visits a SeeTree node.visitSerial
(SerialTree node, P p) Visits a SerialTree node.visitSerialData
(SerialDataTree node, P p) Visits a SerialDataTree node.visitSerialField
(SerialFieldTree node, P p) Visits a SerialFieldTree node.visitSince
(SinceTree node, P p) Visits a SinceTree node.visitStartElement
(StartElementTree node, P p) Visits a StartElementTree node.default R
visitSummary
(SummaryTree node, P p) Visits a SummaryTree node.default R
visitSystemProperty
(SystemPropertyTree node, P p) Visits a SystemPropertyTree node.Visits a TextTree node.visitThrows
(ThrowsTree node, P p) Visits a ThrowsTree node.visitUnknownBlockTag
(UnknownBlockTagTree node, P p) Visits an UnknownBlockTagTree node.visitUnknownInlineTag
(UnknownInlineTagTree node, P p) Visits an UnknownInlineTagTree node.default R
Visits a UsesTree node.visitValue
(ValueTree node, P p) Visits a ValueTree node.visitVersion
(VersionTree node, P p) Visits a VersionTree node.
-
Method Details
-
visitAttribute
Visits an AttributeTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitAuthor
Visits an AuthorTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitComment
Visits a CommentTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDeprecated
Visits a DeprecatedTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDocComment
Visits a DocCommentTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDocRoot
Visits a DocRootTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitDocType
Visits a DocTypeTree 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 an EndElementTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitEntity
Visits an EntityTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitErroneous
Visits an ErroneousTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitHidden
Visits a HiddenTree 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 an IdentifierTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitIndex
Visits an IndexTree 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 an InheritDocTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitLink
Visits a LinkTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitLiteral
Visits an LiteralTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitParam
Visits a ParamTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitProvides
Visits a ProvidesTree 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 a ReferenceTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitReturn
Visits a ReturnTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSee
Visits a SeeTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSerial
Visits a SerialTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSerialData
Visits a SerialDataTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSerialField
Visits a SerialFieldTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSince
Visits a SinceTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitStartElement
Visits a StartElementTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitSummary
Visits a SummaryTree 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 a SystemPropertyTree 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 a TextTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitThrows
Visits a ThrowsTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitUnknownBlockTag
Visits an UnknownBlockTagTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitUnknownInlineTag
Visits an UnknownInlineTagTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitUses
Visits a UsesTree 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 a ValueTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitVersion
Visits a VersionTree node.- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- a result value
-
visitOther
Visits an unknown type of DocTree 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
-