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>
public class SimpleDocTreeVisitor<R,P> extends Object implements DocTreeVisitor<R,P>
A simple visitor for tree nodes.
- Since:
- 1.8
-
Field Summary
Fields Modifier and Type Field Description protected R
DEFAULT_VALUE
The default value, returned by thedefault action
. -
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleDocTreeVisitor()
Creates a visitor, with a DEFAULT_VALUE ofnull
.protected
SimpleDocTreeVisitor(R defaultValue)
Creates a visitor, with a specified DEFAULT_VALUE. -
Method Summary
Modifier and Type Method Description protected R
defaultAction(DocTree node, P p)
The default action, used by all visit methods that are not overridden.R
visit(DocTree node, P p)
Invokes the appropriate visit method specific to the type of the node.R
visit(Iterable<? extends DocTree> nodes, P p)
Invokes the appropriate visit method on each of a sequence of nodes.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
visitDocType(DocTypeTree node, P p)
Visits a DocTypeTree 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
visitSummary(SummaryTree node, P p)
Visits a SummaryTree node.R
visitSystemProperty(SystemPropertyTree node, P p)
Visits a SystemPropertyTree 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.
-
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 an AttributeTree node. This implementation callsdefaultAction
.- Specified by:
visitAttribute
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitAuthor
Visits an AuthorTree node. This implementation callsdefaultAction
.- Specified by:
visitAuthor
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitComment
Visits a CommentTree node. This implementation callsdefaultAction
.- Specified by:
visitComment
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDeprecated
Visits a DeprecatedTree node. This implementation callsdefaultAction
.- Specified by:
visitDeprecated
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDocComment
Visits a DocCommentTree node. This implementation callsdefaultAction
.- Specified by:
visitDocComment
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDocRoot
Visits a DocRootTree node. This implementation callsdefaultAction
.- Specified by:
visitDocRoot
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDocType
Visits a DocTypeTree 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 an EndElementTree node. This implementation callsdefaultAction
.- Specified by:
visitEndElement
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitEntity
Visits an EntityTree node. This implementation callsdefaultAction
.- Specified by:
visitEntity
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitErroneous
Visits an ErroneousTree node. This implementation callsdefaultAction
.- Specified by:
visitErroneous
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitHidden
Visits a HiddenTree node. This implementation callsdefaultAction
.- Specified by:
visitHidden
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitIdentifier
Visits an IdentifierTree node. This implementation callsdefaultAction
.- Specified by:
visitIdentifier
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitIndex
Visits an IndexTree node. This implementation callsdefaultAction
.- Specified by:
visitIndex
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitInheritDoc
Visits an InheritDocTree node. This implementation callsdefaultAction
.- Specified by:
visitInheritDoc
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitLink
Visits a LinkTree node. This implementation callsdefaultAction
.- Specified by:
visitLink
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitLiteral
Visits an LiteralTree node. This implementation callsdefaultAction
.- Specified by:
visitLiteral
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitParam
Visits a ParamTree node. This implementation callsdefaultAction
.- Specified by:
visitParam
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitProvides
Visits a ProvidesTree node. This implementation callsdefaultAction
.- Specified by:
visitProvides
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitReference
Visits a ReferenceTree node. This implementation callsdefaultAction
.- Specified by:
visitReference
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitReturn
Visits a ReturnTree node. This implementation callsdefaultAction
.- Specified by:
visitReturn
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSee
Visits a SeeTree node. This implementation callsdefaultAction
.- Specified by:
visitSee
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSerial
Visits a SerialTree node. This implementation callsdefaultAction
.- Specified by:
visitSerial
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSerialData
Visits a SerialDataTree node. This implementation callsdefaultAction
.- Specified by:
visitSerialData
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSerialField
Visits a SerialFieldTree node. This implementation callsdefaultAction
.- Specified by:
visitSerialField
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSince
Visits a SinceTree node. This implementation callsdefaultAction
.- Specified by:
visitSince
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitStartElement
Visits a StartElementTree node. This implementation callsdefaultAction
.- Specified by:
visitStartElement
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSummary
Visits a SummaryTree node. This implementation callsdefaultAction
.- Specified by:
visitSummary
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 10
-
visitSystemProperty
Visits a SystemPropertyTree node. This implementation callsdefaultAction
.- Specified by:
visitSystemProperty
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 12
-
visitText
Visits a TextTree node. This implementation callsdefaultAction
.- Specified by:
visitText
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitThrows
Visits a ThrowsTree node. This implementation callsdefaultAction
.- Specified by:
visitThrows
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUnknownBlockTag
Visits an UnknownBlockTagTree node. This implementation callsdefaultAction
.- Specified by:
visitUnknownBlockTag
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUnknownInlineTag
Visits an UnknownInlineTagTree node. This implementation callsdefaultAction
.- Specified by:
visitUnknownInlineTag
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUses
Visits a UsesTree node. This implementation callsdefaultAction
.- Specified by:
visitUses
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 9
-
visitValue
Visits a ValueTree node. This implementation callsdefaultAction
.- Specified by:
visitValue
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitVersion
Visits a VersionTreeTree node. This implementation callsdefaultAction
.- Specified by:
visitVersion
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
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. This implementation callsdefaultAction
.- Specified by:
visitOther
in interfaceDocTreeVisitor<R,P>
- Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-