< prev index next >

src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java

Print this page

 297      * @param p  {@inheritDoc}
 298      * @return the result of scanning
 299      */
 300     @Override
 301     public R visitWhileLoop(WhileLoopTree node, P p) {
 302         R r = scan(node.getCondition(), p);
 303         r = scanAndReduce(node.getStatement(), p, r);
 304         return r;
 305     }
 306 
 307     /**
 308      * {@inheritDoc}
 309      *
 310      * @implSpec This implementation scans the children in left to right order.
 311      *
 312      * @param node  {@inheritDoc}
 313      * @param p  {@inheritDoc}
 314      * @return the result of scanning
 315      */
 316     @Override














 317     public R visitForLoop(ForLoopTree node, P p) {
 318         R r = scan(node.getInitializer(), p);
 319         r = scanAndReduce(node.getCondition(), p, r);
 320         r = scanAndReduce(node.getUpdate(), p, r);
 321         r = scanAndReduce(node.getStatement(), p, r);
 322         return r;
 323     }
 324 
 325     /**
 326      * {@inheritDoc}
 327      *
 328      * @implSpec This implementation scans the children in left to right order.
 329      *
 330      * @param node  {@inheritDoc}
 331      * @param p  {@inheritDoc}
 332      * @return the result of scanning
 333      */
 334     @Override
 335     public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) {
 336         R r = scan(node.getVariable(), p);

 391      * @implSpec This implementation scans the children in left to right order.
 392      *
 393      * @param node  {@inheritDoc}
 394      * @param p  {@inheritDoc}
 395      * @return the result of scanning
 396      */
 397     @Override
 398     public R visitCase(CaseTree node, P p) {
 399         R r = scan(node.getExpressions(), p);
 400         if (node.getCaseKind() == CaseTree.CaseKind.RULE)
 401             r = scanAndReduce(node.getBody(), p, r);
 402         else
 403             r = scanAndReduce(node.getStatements(), p, r);
 404         return r;
 405     }
 406 
 407     /**
 408      * {@inheritDoc}
 409      *
 410      * @implSpec This implementation scans the children in left to right order.












 411      *
 412      * @param node  {@inheritDoc}
 413      * @param p  {@inheritDoc}
 414      * @return the result of scanning
 415      */
 416     @Override
 417     public R visitSynchronized(SynchronizedTree node, P p) {
 418         R r = scan(node.getExpression(), p);
 419         r = scanAndReduce(node.getBlock(), p, r);
 420         return r;
 421     }
 422 
 423     /**
 424      * {@inheritDoc}
 425      *
 426      * @implSpec This implementation scans the children in left to right order.
 427      *
 428      * @param node  {@inheritDoc}
 429      * @param p  {@inheritDoc}
 430      * @return the result of scanning

 297      * @param p  {@inheritDoc}
 298      * @return the result of scanning
 299      */
 300     @Override
 301     public R visitWhileLoop(WhileLoopTree node, P p) {
 302         R r = scan(node.getCondition(), p);
 303         r = scanAndReduce(node.getStatement(), p, r);
 304         return r;
 305     }
 306 
 307     /**
 308      * {@inheritDoc}
 309      *
 310      * @implSpec This implementation scans the children in left to right order.
 311      *
 312      * @param node  {@inheritDoc}
 313      * @param p  {@inheritDoc}
 314      * @return the result of scanning
 315      */
 316     @Override
 317     public R visitWithField(WithFieldTree node, P p) {
 318         R r = scan(node.getField(), p);
 319         r = scanAndReduce(node.getValue(), p, r);
 320         return r;
 321     }
 322 
 323     /**
 324      * {@inheritDoc} This implementation scans the children in left to right order.
 325      *
 326      * @param node  {@inheritDoc}
 327      * @param p  {@inheritDoc}
 328      * @return the result of scanning
 329      */
 330     @Override
 331     public R visitForLoop(ForLoopTree node, P p) {
 332         R r = scan(node.getInitializer(), p);
 333         r = scanAndReduce(node.getCondition(), p, r);
 334         r = scanAndReduce(node.getUpdate(), p, r);
 335         r = scanAndReduce(node.getStatement(), p, r);
 336         return r;
 337     }
 338 
 339     /**
 340      * {@inheritDoc}
 341      *
 342      * @implSpec This implementation scans the children in left to right order.
 343      *
 344      * @param node  {@inheritDoc}
 345      * @param p  {@inheritDoc}
 346      * @return the result of scanning
 347      */
 348     @Override
 349     public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) {
 350         R r = scan(node.getVariable(), p);

 405      * @implSpec This implementation scans the children in left to right order.
 406      *
 407      * @param node  {@inheritDoc}
 408      * @param p  {@inheritDoc}
 409      * @return the result of scanning
 410      */
 411     @Override
 412     public R visitCase(CaseTree node, P p) {
 413         R r = scan(node.getExpressions(), p);
 414         if (node.getCaseKind() == CaseTree.CaseKind.RULE)
 415             r = scanAndReduce(node.getBody(), p, r);
 416         else
 417             r = scanAndReduce(node.getStatements(), p, r);
 418         return r;
 419     }
 420 
 421     /**
 422      * {@inheritDoc}
 423      *
 424      * @implSpec This implementation scans the children in left to right order.
 425      *
 426      * @param node  {@inheritDoc}
 427      * @param p  {@inheritDoc}
 428      * @return the result of scanning
 429      */
 430     @Override
 431     public R visitDefaultValue(DefaultValueTree node, P p) {
 432         return scan(node.getType(), p);
 433     }
 434 
 435     /**
 436      * {@inheritDoc} This implementation scans the children in left to right order.
 437      *
 438      * @param node  {@inheritDoc}
 439      * @param p  {@inheritDoc}
 440      * @return the result of scanning
 441      */
 442     @Override
 443     public R visitSynchronized(SynchronizedTree node, P p) {
 444         R r = scan(node.getExpression(), p);
 445         r = scanAndReduce(node.getBlock(), p, r);
 446         return r;
 447     }
 448 
 449     /**
 450      * {@inheritDoc}
 451      *
 452      * @implSpec This implementation scans the children in left to right order.
 453      *
 454      * @param node  {@inheritDoc}
 455      * @param p  {@inheritDoc}
 456      * @return the result of scanning
< prev index next >