java.lang.Object
com.sun.source.util.SimpleDocTreeVisitor<R,P>
- 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 Implemented Interfaces:
DocTreeVisitor<R,
P>
A simple visitor for tree nodes.
- Since:
- 1.8
-
Field Summary
Modifier and TypeFieldDescriptionprotected final R
The default value, returned by thedefault action
. -
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a visitor, with a DEFAULT_VALUE ofnull
.protected
SimpleDocTreeVisitor
(R defaultValue) Creates a visitor, with a specified DEFAULT_VALUE. -
Method Summary
Modifier and TypeMethodDescriptionprotected R
defaultAction
(DocTree node, P p) The default action, used by all visit methods that are not overridden.final R
Invokes the appropriate visit method specific to the type of the node.final R
Invokes the appropriate visit method on each of a sequence of nodes.visitAttribute
(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.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.visitEscape
(EscapeTree node, P p) Visits anEscapeTree
node.visitHidden
(HiddenTree node, P p) Visits aHiddenTree
node.visitIdentifier
(IdentifierTree node, P p) Visits anIdentifierTree
node.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.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.visitSnippet
(SnippetTree node, P p) Visits aSnippetTree
node.Visits aSpecTree
node.visitStartElement
(StartElementTree node, P p) Visits aStartElementTree
node.visitSummary
(SummaryTree node, P p) Visits aSummaryTree
node.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.Visits aUsesTree
node.visitValue
(ValueTree node, P p) Visits aValueTree
node.visitVersion
(VersionTree node, P p) Visits aVersionTree
node.
-
Field Details
-
DEFAULT_VALUE
The default value, returned by thedefault action
.
-
-
Constructor Details
-
SimpleDocTreeVisitor
protected SimpleDocTreeVisitor()Creates a visitor, with a DEFAULT_VALUE ofnull
. -
SimpleDocTreeVisitor
Creates a visitor, with a specified DEFAULT_VALUE.- Parameters:
defaultValue
- the default value to be returned by the default action
-
-
Method Details
-
defaultAction
The default action, used by all visit methods that are not overridden.- Parameters:
node
- the node being visitedp
- the parameter value passed to the visit method- Returns:
- the result value to be returned from the visit method
-
visit
Invokes the appropriate visit method specific to the type of the node.- Parameters:
node
- the node on which to dispatchp
- a parameter to be passed to the appropriate visit method- Returns:
- the value returns from the appropriate visit method
-
visit
Invokes the appropriate visit method on each of a sequence of nodes.- Parameters:
nodes
- the nodes on which to dispatchp
- a parameter value to be passed to each appropriate visit method- Returns:
- the value return from the last of the visit methods, or null if none were called
-
visitAttribute
Visits anAttributeTree
node.- Specified by:
visitAttribute
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitAuthor
Visits anAuthorTree
node.- Specified by:
visitAuthor
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitComment
Visits aCommentTree
node.- Specified by:
visitComment
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDeprecated
Visits aDeprecatedTree
node.- Specified by:
visitDeprecated
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDocComment
Visits aDocCommentTree
node.- Specified by:
visitDocComment
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDocRoot
Visits aDocRootTree
node.- Specified by:
visitDocRoot
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDocType
Visits aDocTypeTree
node.- Specified by:
visitDocType
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 10
-
visitEndElement
Visits anEndElementTree
node.- Specified by:
visitEndElement
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitEntity
Visits anEntityTree
node.- Specified by:
visitEntity
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitErroneous
Visits anErroneousTree
node.- Specified by:
visitErroneous
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitEscape
Visits anEscapeTree
node.- Specified by:
visitEscape
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 21
-
visitHidden
Visits aHiddenTree
node.- Specified by:
visitHidden
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitIdentifier
Visits anIdentifierTree
node.- Specified by:
visitIdentifier
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitIndex
Visits anIndexTree
node.- Specified by:
visitIndex
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitInheritDoc
Visits anInheritDocTree
node.- Specified by:
visitInheritDoc
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitLink
Visits aLinkTree
node.- Specified by:
visitLink
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitLiteral
Visits anLiteralTree
node.- Specified by:
visitLiteral
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitParam
Visits aParamTree
node.- Specified by:
visitParam
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitProvides
Visits aProvidesTree
node.- Specified by:
visitProvides
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitReference
Visits aReferenceTree
node.- Specified by:
visitReference
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitReturn
Visits aReturnTree
node.- Specified by:
visitReturn
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSee
Visits aSeeTree
node.- Specified by:
visitSee
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSerial
Visits aSerialTree
node.- Specified by:
visitSerial
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSerialData
Visits aSerialDataTree
node.- Specified by:
visitSerialData
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSerialField
Visits aSerialFieldTree
node.- Specified by:
visitSerialField
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSince
Visits aSinceTree
node.- Specified by:
visitSince
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSnippet
Visits aSnippetTree
node.- Specified by:
visitSnippet
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 18
-
visitSpec
Visits aSpecTree
node.- Specified by:
visitSpec
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 20
-
visitStartElement
Visits aStartElementTree
node.- Specified by:
visitStartElement
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSummary
Visits aSummaryTree
node.- Specified by:
visitSummary
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 10
-
visitSystemProperty
Visits aSystemPropertyTree
node.- Specified by:
visitSystemProperty
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 12
-
visitText
Visits aTextTree
node.- Specified by:
visitText
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitThrows
Visits aThrowsTree
node.- Specified by:
visitThrows
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUnknownBlockTag
Visits anUnknownBlockTagTree
node.- Specified by:
visitUnknownBlockTag
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUnknownInlineTag
Visits anUnknownInlineTagTree
node.- Specified by:
visitUnknownInlineTag
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUses
Visits aUsesTree
node.- Specified by:
visitUses
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitValue
Visits aValueTree
node.- Specified by:
visitValue
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitVersion
Visits aVersionTree
node.- Specified by:
visitVersion
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
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.- Specified by:
visitOther
in interfaceDocTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-