java.lang.Object
com.sun.source.util.SimpleDocTreeVisitor<R,P>
- Type Parameters:
R- the return type of this visitor's methods. UseVoidfor visitors that do not need to return results.P- the type of the additional parameter to this visitor's methods. UseVoidfor 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
FieldsModifier and TypeFieldDescriptionprotected final RThe default value, returned by thedefault action. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a visitor, with a DEFAULT_VALUE ofnull.protectedSimpleDocTreeVisitor(R defaultValue) Creates a visitor, with a specified DEFAULT_VALUE. -
Method Summary
Modifier and TypeMethodDescriptionprotected RdefaultAction(DocTree node, P p) The default action, used by all visit methods that are not overridden.final RInvokes the appropriate visit method specific to the type of the node.final RInvokes the appropriate visit method on each of a sequence of nodes.visitAttribute(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.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.visitHidden(HiddenTree node, P p) Visits a HiddenTree node.visitIdentifier(IdentifierTree node, P p) Visits an IdentifierTree node.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.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.visitSummary(SummaryTree node, P p) Visits a SummaryTree node.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.Visits a UsesTree node.visitValue(ValueTree node, P p) Visits a ValueTree node.visitVersion(VersionTree node, P p) Visits a VersionTree 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.- Specified by:
visitAttributein 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 an AuthorTree node.- Specified by:
visitAuthorin 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 a CommentTree node.- Specified by:
visitCommentin 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 a DeprecatedTree node.- Specified by:
visitDeprecatedin 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 a DocCommentTree node.- Specified by:
visitDocCommentin 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 a DocRootTree node.- Specified by:
visitDocRootin 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 a DocTypeTree node.- Specified by:
visitDocTypein 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.- Specified by:
visitEndElementin 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 an EntityTree node.- Specified by:
visitEntityin 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 an ErroneousTree node.- Specified by:
visitErroneousin interfaceDocTreeVisitor<R,P> - Implementation Requirements:
- This implementation calls
defaultAction. - Parameters:
node- the node being visitedp- a parameter value- Returns:
- the result of
defaultAction
-
visitHidden
Visits a HiddenTree node.- Specified by:
visitHiddenin 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 an IdentifierTree node.- Specified by:
visitIdentifierin 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 an IndexTree node.- Specified by:
visitIndexin 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 an InheritDocTree node.- Specified by:
visitInheritDocin 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 a LinkTree node.- Specified by:
visitLinkin 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 an LiteralTree node.- Specified by:
visitLiteralin 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 a ParamTree node.- Specified by:
visitParamin 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 a ProvidesTree node.- Specified by:
visitProvidesin 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 a ReferenceTree node.- Specified by:
visitReferencein 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 a ReturnTree node.- Specified by:
visitReturnin 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 a SeeTree node.- Specified by:
visitSeein 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 a SerialTree node.- Specified by:
visitSerialin 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 a SerialDataTree node.- Specified by:
visitSerialDatain 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 a SerialFieldTree node.- Specified by:
visitSerialFieldin 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 a SinceTree node.- Specified by:
visitSincein interfaceDocTreeVisitor<R,P> - Implementation Requirements:
- This implementation calls
defaultAction. - Parameters:
node- the node being visitedp- a parameter value- Returns:
- the result of
defaultAction
-
visitStartElement
Visits a StartElementTree node.- Specified by:
visitStartElementin 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 a SummaryTree node.- Specified by:
visitSummaryin 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 a SystemPropertyTree node.- Specified by:
visitSystemPropertyin 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 a TextTree node.- Specified by:
visitTextin 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 a ThrowsTree node.- Specified by:
visitThrowsin 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 an UnknownBlockTagTree node.- Specified by:
visitUnknownBlockTagin 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 an UnknownInlineTagTree node.- Specified by:
visitUnknownInlineTagin 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 a UsesTree node.- Specified by:
visitUsesin 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 a ValueTree node.- Specified by:
visitValuein 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 a VersionTree node.- Specified by:
visitVersionin 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 of DocTree node. This can occur if the set of tags evolves and new kinds of nodes are added to theDocTreehierarchy.- Specified by:
visitOtherin interfaceDocTreeVisitor<R,P> - Implementation Requirements:
- This implementation calls
defaultAction. - Parameters:
node- the node being visitedp- a parameter value- Returns:
- the result of
defaultAction
-