Class TreeScanner<R,P> 
java.lang.Object
com.sun.source.util.TreeScanner<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:
- TreeVisitor<R,- P> 
- Direct Known Subclasses:
- TreePathScanner
A TreeVisitor that visits all the child tree nodes.
 To visit nodes of a particular type, just override the
 corresponding visitXYZ method.
 Inside your method, call super.visitXYZ to visit descendant
 nodes.
 
Here is an example to count the number of identifier nodes in a tree:
   class CountIdentifiers extends TreeScanner<Integer,Void> {
      @Override
      public Integer visitIdentifier(IdentifierTree node, Void p) {
          return 1;
      }
      @Override
      public Integer reduce(Integer r1, Integer r2) {
          return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2);
      }
   }
 - Implementation Requirements:
- The default implementation of the visitXYZ methods will determine a result as follows: - If the node being visited has no children, the result will be null.
- If the node being visited has one child, the result will be the
 result of calling scanwith that child. The child may be a simple node or itself a list of nodes.
- If the node being visited has more than one child, the result will
 be determined by calling scanwith each child in turn, and then combining the result of each scan after the first with the cumulative result so far, as determined by thereduce(R, R)method. Each child may be either a simple node or a list of nodes. The default behavior of thereducemethod is such that the result of the visitXYZ method will be the result of the last child scanned.
 
- If the node being visited has no children, the result will be 
- Since:
- 1.6
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReduces two results into a combined result.Scans a single node.Scans a sequence of nodes.visitAnnotatedType(AnnotatedTypeTree node, P p) Visits anAnnotatedTypeTreenode.visitAnnotation(AnnotationTree node, P p) Visits anAnnotatedTreenode.visitAnyPattern(AnyPatternTree node, P p) Visits aAnyPatternTreenode.visitArrayAccess(ArrayAccessTree node, P p) Visits anArrayAccessTreenode.visitArrayType(ArrayTypeTree node, P p) Visits anArrayTypeTreenode.visitAssert(AssertTree node, P p) Visits anAssertTreenode.visitAssignment(AssignmentTree node, P p) Visits anAssignmentTreenode.visitBinary(BinaryTree node, P p) Visits aBinaryTreenode.visitBindingPattern(BindingPatternTree node, P p) Visits aBindingPatternTreenode.visitBlock(BlockTree node, P p) Visits aBlockTreenode.visitBreak(BreakTree node, P p) Visits aBreakTreenode.Visits aCaseTreenode.visitCatch(CatchTree node, P p) Visits aCatchTreenode.visitClass(ClassTree node, P p) Visits aClassTreenode.visitCompilationUnit(CompilationUnitTree node, P p) Visits aCompilationUnitTreenode.Visits aCompoundAssignmentTreenode.Visits aConditionalExpressionTreenode.visitConstantCaseLabel(ConstantCaseLabelTree node, P p) Visits aConstantCaseLabelTreenode.visitContinue(ContinueTree node, P p) Visits aContinueTreenode.Visits aDeconstructionPatternTreenode.visitDefaultCaseLabel(DefaultCaseLabelTree node, P p) Visits aDefaultCaseLabelTreenode.visitDoWhileLoop(DoWhileLoopTree node, P p) Visits aDoWhileTreenode.visitEmptyStatement(EmptyStatementTree node, P p) Visits anEmptyStatementTreenode.visitEnhancedForLoop(EnhancedForLoopTree node, P p) Visits anEnhancedForLoopTreenode.visitErroneous(ErroneousTree node, P p) Visits anErroneousTreenode.visitExports(ExportsTree node, P p) Visits anExportsTreenode.Visits anExpressionStatementTreenode.visitForLoop(ForLoopTree node, P p) Visits aForLoopTreenode.visitIdentifier(IdentifierTree node, P p) Visits anIdentifierTreenode.Visits anIfTreenode.visitImport(ImportTree node, P p) Visits anImportTreenode.visitInstanceOf(InstanceOfTree node, P p) Visits anInstanceOfTreenode.visitIntersectionType(IntersectionTypeTree node, P p) Visits anIntersectionTypeTreenode.visitLabeledStatement(LabeledStatementTree node, P p) Visits aLabeledStatementTreenode.visitLambdaExpression(LambdaExpressionTree node, P p) Visits aLambdaExpressionTreenode.visitLiteral(LiteralTree node, P p) Visits aLiteralTreenode.visitMemberReference(MemberReferenceTree node, P p) Visits aMemberReferenceTreenode.visitMemberSelect(MemberSelectTree node, P p) Visits aMemberSelectTreenode.visitMethod(MethodTree node, P p) Visits aMethodTreenode.visitMethodInvocation(MethodInvocationTree node, P p) Visits aMethodInvocationTreenode.visitModifiers(ModifiersTree node, P p) Visits aModifiersTreenode.visitModule(ModuleTree node, P p) Visits aModuleTreenode.visitNewArray(NewArrayTree node, P p) Visits aNewArrayTreenode.visitNewClass(NewClassTree node, P p) Visits aNewClassTreenode.visitOpens(OpensTree node, P p) Visits anOpensTreenode.visitOther(Tree node, P p) Visits an unknown type ofTreenode.visitPackage(PackageTree node, P p) Visits aPackageTreenode.visitParameterizedType(ParameterizedTypeTree node, P p) Visits aParameterizedTypeTreenode.visitParenthesized(ParenthesizedTree node, P p) Visits aParenthesizedTreenode.visitPatternCaseLabel(PatternCaseLabelTree node, P p) Visits aPatternCaseLabelTreenode.visitPrimitiveType(PrimitiveTypeTree node, P p) Visits aPrimitiveTypeTreenode.visitProvides(ProvidesTree node, P p) Visits aProvidesTreenode.visitRequires(RequiresTree node, P p) Visits aRequiresTreenode.visitReturn(ReturnTree node, P p) Visits aReturnTreenode.visitSwitch(SwitchTree node, P p) Visits aSwitchTreenode.visitSwitchExpression(SwitchExpressionTree node, P p) Visits aSwitchExpressionTreenode.visitSynchronized(SynchronizedTree node, P p) Visits aSynchronizedTreenode.visitThrow(ThrowTree node, P p) Visits aThrowTreenode.Visits aTryTreenode.visitTypeCast(TypeCastTree node, P p) Visits aTypeCastTreenode.visitTypeParameter(TypeParameterTree node, P p) Visits aTypeParameterTreenode.visitUnary(UnaryTree node, P p) Visits aUnaryTreenode.visitUnionType(UnionTypeTree node, P p) Visits aUnionTypeTreenode.Visits aUsesTreenode.visitVariable(VariableTree node, P p) Visits aVariableTreenode.visitWhileLoop(WhileLoopTree node, P p) Visits aWhileLoopTreenode.visitWildcard(WildcardTree node, P p) Visits aWildcardTypeTreenode.visitYield(YieldTree node, P p) Visits aYieldTreenode.
- 
Constructor Details- 
TreeScannerpublic TreeScanner()Constructs aTreeScanner.
 
- 
- 
Method Details- 
scan
- 
scan
- 
reduceReduces two results into a combined result. The default implementation is to return the first parameter. The general contract of the method is that it may take any action whatsoever.- Parameters:
- r1- the first of the values to be combined
- r2- the second of the values to be combined
- Returns:
- the result of combining the two parameters
 
- 
visitCompilationUnitVisits aCompilationUnitTreenode.- Specified by:
- visitCompilationUnitin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitPackageVisits aPackageTreenode.- Specified by:
- visitPackagein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitImportVisits anImportTreenode.- Specified by:
- visitImportin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitClassVisits aClassTreenode.- Specified by:
- visitClassin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitMethodVisits aMethodTreenode.- Specified by:
- visitMethodin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitVariableVisits aVariableTreenode.- Specified by:
- visitVariablein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitEmptyStatementVisits anEmptyStatementTreenode.- Specified by:
- visitEmptyStatementin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitBlockVisits aBlockTreenode.- Specified by:
- visitBlockin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitDoWhileLoopVisits aDoWhileTreenode.- Specified by:
- visitDoWhileLoopin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitWhileLoopVisits aWhileLoopTreenode.- Specified by:
- visitWhileLoopin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitForLoopVisits aForLoopTreenode.- Specified by:
- visitForLoopin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitEnhancedForLoopVisits anEnhancedForLoopTreenode.- Specified by:
- visitEnhancedForLoopin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitLabeledStatementVisits aLabeledStatementTreenode.- Specified by:
- visitLabeledStatementin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitSwitchVisits aSwitchTreenode.- Specified by:
- visitSwitchin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitSwitchExpressionVisits aSwitchExpressionTreenode.- Specified by:
- visitSwitchExpressionin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 14
 
- 
visitCaseVisits aCaseTreenode.- Specified by:
- visitCasein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitSynchronizedVisits aSynchronizedTreenode.- Specified by:
- visitSynchronizedin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitTryVisits aTryTreenode.- Specified by:
- visitTryin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitCatchVisits aCatchTreenode.- Specified by:
- visitCatchin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitConditionalExpressionVisits aConditionalExpressionTreenode.- Specified by:
- visitConditionalExpressionin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitIf
- 
visitExpressionStatementVisits anExpressionStatementTreenode.- Specified by:
- visitExpressionStatementin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitBreakVisits aBreakTreenode.- Specified by:
- visitBreakin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitContinueVisits aContinueTreenode.- Specified by:
- visitContinuein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitReturnVisits aReturnTreenode.- Specified by:
- visitReturnin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitThrowVisits aThrowTreenode.- Specified by:
- visitThrowin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitAssertVisits anAssertTreenode.- Specified by:
- visitAssertin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitMethodInvocationVisits aMethodInvocationTreenode.- Specified by:
- visitMethodInvocationin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitNewClassVisits aNewClassTreenode.- Specified by:
- visitNewClassin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitNewArrayVisits aNewArrayTreenode.- Specified by:
- visitNewArrayin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitLambdaExpressionVisits aLambdaExpressionTreenode.- Specified by:
- visitLambdaExpressionin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitParenthesizedVisits aParenthesizedTreenode.- Specified by:
- visitParenthesizedin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitAssignmentVisits anAssignmentTreenode.- Specified by:
- visitAssignmentin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitCompoundAssignmentVisits aCompoundAssignmentTreenode.- Specified by:
- visitCompoundAssignmentin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitUnaryVisits aUnaryTreenode.- Specified by:
- visitUnaryin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitBinaryVisits aBinaryTreenode.- Specified by:
- visitBinaryin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitTypeCastVisits aTypeCastTreenode.- Specified by:
- visitTypeCastin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitInstanceOfVisits anInstanceOfTreenode.- Specified by:
- visitInstanceOfin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitAnyPatternVisits aAnyPatternTreenode.- Specified by:
- visitAnyPatternin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 21
 
- 
visitBindingPatternVisits aBindingPatternTreenode.- Specified by:
- visitBindingPatternin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 14
 
- 
visitDefaultCaseLabelVisits aDefaultCaseLabelTreenode.- Specified by:
- visitDefaultCaseLabelin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 21
 
- 
visitConstantCaseLabelVisits aConstantCaseLabelTreenode.- Specified by:
- visitConstantCaseLabelin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 21
 
- 
visitPatternCaseLabelVisits aPatternCaseLabelTreenode.- Specified by:
- visitPatternCaseLabelin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 21
 
- 
visitDeconstructionPatternVisits aDeconstructionPatternTreenode.- Specified by:
- visitDeconstructionPatternin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 21
 
- 
visitArrayAccessVisits anArrayAccessTreenode. This implementation scans the children in left to right order.- Specified by:
- visitArrayAccessin interface- TreeVisitor<R,- P> 
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitMemberSelectVisits aMemberSelectTreenode.- Specified by:
- visitMemberSelectin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitMemberReferenceVisits aMemberReferenceTreenode.- Specified by:
- visitMemberReferencein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitIdentifierVisits anIdentifierTreenode.- Specified by:
- visitIdentifierin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitLiteralVisits aLiteralTreenode.- Specified by:
- visitLiteralin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitPrimitiveTypeVisits aPrimitiveTypeTreenode.- Specified by:
- visitPrimitiveTypein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitArrayTypeVisits anArrayTypeTreenode.- Specified by:
- visitArrayTypein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitParameterizedTypeVisits aParameterizedTypeTreenode.- Specified by:
- visitParameterizedTypein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitUnionTypeVisits aUnionTypeTreenode.- Specified by:
- visitUnionTypein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitIntersectionTypeVisits anIntersectionTypeTreenode.- Specified by:
- visitIntersectionTypein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitTypeParameterVisits aTypeParameterTreenode.- Specified by:
- visitTypeParameterin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitWildcardVisits aWildcardTypeTreenode.- Specified by:
- visitWildcardin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitModifiersVisits aModifiersTreenode.- Specified by:
- visitModifiersin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitAnnotationVisits anAnnotatedTreenode.- Specified by:
- visitAnnotationin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitAnnotatedTypeVisits anAnnotatedTypeTreenode.- Specified by:
- visitAnnotatedTypein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitModuleVisits aModuleTreenode.- Specified by:
- visitModulein interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitExportsVisits anExportsTreenode.- Specified by:
- visitExportsin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitOpensVisits anOpensTreenode.- Specified by:
- visitOpensin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitProvidesVisits aProvidesTreenode.- Specified by:
- visitProvidesin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitRequiresVisits aRequiresTreenode.- Specified by:
- visitRequiresin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitUsesVisits aUsesTreenode.- Specified by:
- visitUsesin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitOtherVisits an unknown type ofTreenode. This can occur if the language evolves and new kinds of nodes are added to theTreehierarchy.- Specified by:
- visitOtherin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitErroneousVisits anErroneousTreenode.- Specified by:
- visitErroneousin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation returns null.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
 
- 
visitYieldVisits aYieldTreenode.- Specified by:
- visitYieldin interface- TreeVisitor<R,- P> 
- Implementation Requirements:
- This implementation scans the children in left to right order.
- Parameters:
- node- the node being visited
- p- a parameter value
- Returns:
- the result of scanning
- Since:
- 14
 
 
-