- java.lang.Object
- 
- com.sun.source.util.SimpleDocTreeVisitor<R,P>
 
- 
- Type Parameters:
- R- the return type of this visitor's methods. Use- Voidfor visitors that do not need to return results.
- P- the type of the additional parameter to this visitor's methods. Use- Voidfor 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 SummaryFields Modifier and Type Field Description protected RDEFAULT_VALUEThe default value, returned by thedefault action.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedSimpleDocTreeVisitor()Creates a visitor, with a DEFAULT_VALUE ofnull.protectedSimpleDocTreeVisitor(R defaultValue)Creates a visitor, with a specified DEFAULT_VALUE.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RdefaultAction(DocTree node, P p)The default action, used by all visit methods that are not overridden.Rvisit(DocTree node, P p)Invokes the appropriate visit method specific to the type of the node.Rvisit(Iterable<? extends DocTree> nodes, P p)Invokes the appropriate visit method on each of a sequence of nodes.RvisitAttribute(AttributeTree node, P p)Visits an AttributeTree node.RvisitAuthor(AuthorTree node, P p)Visits an AuthorTree node.RvisitComment(CommentTree node, P p)Visits a CommentTree node.RvisitDeprecated(DeprecatedTree node, P p)Visits a DeprecatedTree node.RvisitDocComment(DocCommentTree node, P p)Visits a DocCommentTree node.RvisitDocRoot(DocRootTree node, P p)Visits a DocRootTree node.RvisitDocType(DocTypeTree node, P p)Visits a DocTypeTree node.RvisitEndElement(EndElementTree node, P p)Visits an EndElementTree node.RvisitEntity(EntityTree node, P p)Visits an EntityTree node.RvisitErroneous(ErroneousTree node, P p)Visits an ErroneousTree node.RvisitHidden(HiddenTree node, P p)Visits a HiddenTree node.RvisitIdentifier(IdentifierTree node, P p)Visits an IdentifierTree node.RvisitIndex(IndexTree node, P p)Visits an IndexTree node.RvisitInheritDoc(InheritDocTree node, P p)Visits an InheritDocTree node.RvisitLink(LinkTree node, P p)Visits a LinkTree node.RvisitLiteral(LiteralTree node, P p)Visits an LiteralTree node.RvisitOther(DocTree node, P p)Visits an unknown type of DocTree node.RvisitParam(ParamTree node, P p)Visits a ParamTree node.RvisitProvides(ProvidesTree node, P p)Visits a ProvidesTree node.RvisitReference(ReferenceTree node, P p)Visits a ReferenceTree node.RvisitReturn(ReturnTree node, P p)Visits a ReturnTree node.RvisitSee(SeeTree node, P p)Visits a SeeTree node.RvisitSerial(SerialTree node, P p)Visits a SerialTree node.RvisitSerialData(SerialDataTree node, P p)Visits a SerialDataTree node.RvisitSerialField(SerialFieldTree node, P p)Visits a SerialFieldTree node.RvisitSince(SinceTree node, P p)Visits a SinceTree node.RvisitStartElement(StartElementTree node, P p)Visits a StartElementTree node.RvisitSummary(SummaryTree node, P p)Visits a SummaryTree node.RvisitText(TextTree node, P p)Visits a TextTree node.RvisitThrows(ThrowsTree node, P p)Visits a ThrowsTree node.RvisitUnknownBlockTag(UnknownBlockTagTree node, P p)Visits an UnknownBlockTagTree node.RvisitUnknownInlineTag(UnknownInlineTagTree node, P p)Visits an UnknownInlineTagTree node.RvisitUses(UsesTree node, P p)Visits a UsesTree node.RvisitValue(ValueTree node, P p)Visits a ValueTree node.RvisitVersion(VersionTree node, P p)Visits a VersionTreeTree node.
 
- 
- 
- 
Field Detail- 
DEFAULT_VALUEprotected final R DEFAULT_VALUE The default value, returned by thedefault action.
 
- 
 - 
Constructor Detail- 
SimpleDocTreeVisitorprotected SimpleDocTreeVisitor() Creates a visitor, with a DEFAULT_VALUE ofnull.
 - 
SimpleDocTreeVisitorprotected SimpleDocTreeVisitor(R defaultValue) Creates a visitor, with a specified DEFAULT_VALUE.- Parameters:
- defaultValue- the default value to be returned by the default action.
 
 
- 
 - 
Method Detail- 
defaultActionprotected R defaultAction(DocTree node, P p) The default action, used by all visit methods that are not overridden.- Parameters:
- node- the node being visited
- p- the parameter value passed to the visit method
- Returns:
- the result value to be returned from the visit method
 
 - 
visitpublic final R visit(DocTree node, P p) Invokes the appropriate visit method specific to the type of the node.- Parameters:
- node- the node on which to dispatch
- p- a parameter to be passed to the appropriate visit method
- Returns:
- the value returns from the appropriate visit method
 
 - 
visitpublic final R visit(Iterable<? extends DocTree> nodes, P p) Invokes the appropriate visit method on each of a sequence of nodes.- Parameters:
- nodes- the nodes on which to dispatch
- p- 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.
 
 - 
visitAttributepublic R visitAttribute(AttributeTree node, P p) Visits an AttributeTree node. This implementation callsdefaultAction.- Specified by:
- visitAttributein interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitAuthorpublic R visitAuthor(AuthorTree node, P p) Visits an AuthorTree node. This implementation callsdefaultAction.- Specified by:
- visitAuthorin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitCommentpublic R visitComment(CommentTree node, P p) Visits a CommentTree node. This implementation callsdefaultAction.- Specified by:
- visitCommentin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitDeprecatedpublic R visitDeprecated(DeprecatedTree node, P p) Visits a DeprecatedTree node. This implementation callsdefaultAction.- Specified by:
- visitDeprecatedin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitDocCommentpublic R visitDocComment(DocCommentTree node, P p) Visits a DocCommentTree node. This implementation callsdefaultAction.- Specified by:
- visitDocCommentin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitDocRootpublic R visitDocRoot(DocRootTree node, P p) Visits a DocRootTree node. This implementation callsdefaultAction.- Specified by:
- visitDocRootin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitDocTypepublic R visitDocType(DocTypeTree node, P p) Visits a DocTypeTree node.- Specified by:
- visitDocTypein interface- DocTreeVisitor<R,P>
- Implementation Requirements:
- This implementation calls defaultAction.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
- Since:
- 10
 
 - 
visitEndElementpublic R visitEndElement(EndElementTree node, P p) Visits an EndElementTree node. This implementation callsdefaultAction.- Specified by:
- visitEndElementin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitEntitypublic R visitEntity(EntityTree node, P p) Visits an EntityTree node. This implementation callsdefaultAction.- Specified by:
- visitEntityin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitErroneouspublic R visitErroneous(ErroneousTree node, P p) Visits an ErroneousTree node. This implementation callsdefaultAction.- Specified by:
- visitErroneousin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitHiddenpublic R visitHidden(HiddenTree node, P p) Visits a HiddenTree node. This implementation callsdefaultAction.- Specified by:
- visitHiddenin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
- Since:
- 9
 
 - 
visitIdentifierpublic R visitIdentifier(IdentifierTree node, P p) Visits an IdentifierTree node. This implementation callsdefaultAction.- Specified by:
- visitIdentifierin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitIndexpublic R visitIndex(IndexTree node, P p) Visits an IndexTree node. This implementation callsdefaultAction.- Specified by:
- visitIndexin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
- Since:
- 9
 
 - 
visitInheritDocpublic R visitInheritDoc(InheritDocTree node, P p) Visits an InheritDocTree node. This implementation callsdefaultAction.- Specified by:
- visitInheritDocin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitLinkpublic R visitLink(LinkTree node, P p) Visits a LinkTree node. This implementation callsdefaultAction.- Specified by:
- visitLinkin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitLiteralpublic R visitLiteral(LiteralTree node, P p) Visits an LiteralTree node. This implementation callsdefaultAction.- Specified by:
- visitLiteralin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitParampublic R visitParam(ParamTree node, P p) Visits a ParamTree node. This implementation callsdefaultAction.- Specified by:
- visitParamin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitProvidespublic R visitProvides(ProvidesTree node, P p) Visits a ProvidesTree node. This implementation callsdefaultAction.- Specified by:
- visitProvidesin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
- Since:
- 9
 
 - 
visitReferencepublic R visitReference(ReferenceTree node, P p) Visits a ReferenceTree node. This implementation callsdefaultAction.- Specified by:
- visitReferencein interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitReturnpublic R visitReturn(ReturnTree node, P p) Visits a ReturnTree node. This implementation callsdefaultAction.- Specified by:
- visitReturnin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitSeepublic R visitSee(SeeTree node, P p) Visits a SeeTree node. This implementation callsdefaultAction.- Specified by:
- visitSeein interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitSerialpublic R visitSerial(SerialTree node, P p) Visits a SerialTree node. This implementation callsdefaultAction.- Specified by:
- visitSerialin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitSerialDatapublic R visitSerialData(SerialDataTree node, P p) Visits a SerialDataTree node. This implementation callsdefaultAction.- Specified by:
- visitSerialDatain interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitSerialFieldpublic R visitSerialField(SerialFieldTree node, P p) Visits a SerialFieldTree node. This implementation callsdefaultAction.- Specified by:
- visitSerialFieldin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitSincepublic R visitSince(SinceTree node, P p) Visits a SinceTree node. This implementation callsdefaultAction.- Specified by:
- visitSincein interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitStartElementpublic R visitStartElement(StartElementTree node, P p) Visits a StartElementTree node. This implementation callsdefaultAction.- Specified by:
- visitStartElementin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitSummarypublic R visitSummary(SummaryTree node, P p) Visits a SummaryTree node. This implementation callsdefaultAction.- Specified by:
- visitSummaryin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
- Since:
- 10
 
 - 
visitTextpublic R visitText(TextTree node, P p) Visits a TextTree node. This implementation callsdefaultAction.- Specified by:
- visitTextin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitThrowspublic R visitThrows(ThrowsTree node, P p) Visits a ThrowsTree node. This implementation callsdefaultAction.- Specified by:
- visitThrowsin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitUnknownBlockTagpublic R visitUnknownBlockTag(UnknownBlockTagTree node, P p) Visits an UnknownBlockTagTree node. This implementation callsdefaultAction.- Specified by:
- visitUnknownBlockTagin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitUnknownInlineTagpublic R visitUnknownInlineTag(UnknownInlineTagTree node, P p) Visits an UnknownInlineTagTree node. This implementation callsdefaultAction.- Specified by:
- visitUnknownInlineTagin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitUsespublic R visitUses(UsesTree node, P p) Visits a UsesTree node. This implementation callsdefaultAction.- Specified by:
- visitUsesin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
- Since:
- 9
 
 - 
visitValuepublic R visitValue(ValueTree node, P p) Visits a ValueTree node. This implementation callsdefaultAction.- Specified by:
- visitValuein interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitVersionpublic R visitVersion(VersionTree node, P p) Visits a VersionTreeTree node. This implementation callsdefaultAction.- Specified by:
- visitVersionin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 - 
visitOtherpublic R visitOther(DocTree node, P p) 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. This implementation callsdefaultAction.- Specified by:
- visitOtherin interface- DocTreeVisitor<R,P>
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of defaultAction
 
 
- 
 
-