001 /* This file was generated with JastAdd2 (http://jastadd.org) version R20130213 */ 002 package AST; 003 004 import java.util.HashSet; 005 import java.io.File; 006 import java.util.*; 007 import beaver.*; 008 import java.util.ArrayList; 009 import java.util.zip.*; 010 import java.io.*; 011 import java.io.FileNotFoundException; 012 import java.util.Collection; 013 /** 014 * @production TryStmt : {@link Stmt} ::= <span class="component">{@link Block}</span> <span class="component">{@link CatchClause}*</span> <span class="component">[Finally:{@link Block}]</span>; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:219 017 */ 018 public class TryStmt extends Stmt implements Cloneable, FinallyHost { 019 /** 020 * @apilevel low-level 021 */ 022 public void flushCache() { 023 } 024 /** 025 * @apilevel internal 026 */ 027 public void flushCollectionCache() { 028 } 029 /** 030 * @apilevel internal 031 */ 032 @SuppressWarnings({"unchecked", "cast"}) 033 public TryStmt clone() throws CloneNotSupportedException { 034 TryStmt node = (TryStmt)super.clone(); 035 node.branches_computed = false; 036 node.branches_value = null; 037 node.branchesFromFinally_computed = false; 038 node.branchesFromFinally_value = null; 039 node.targetBranches_computed = false; 040 node.targetBranches_value = null; 041 node.escapedBranches_computed = false; 042 node.escapedBranches_value = null; 043 node.isDAafter_Variable_values = null; 044 node.isDUbefore_Variable_values = null; 045 node.isDUafter_Variable_values = null; 046 node.catchableException_TypeDecl_values = null; 047 node.canCompleteNormally_computed = false; 048 node.label_begin_computed = false; 049 node.label_block_end_computed = false; 050 node.label_end_computed = false; 051 node.label_finally_computed = false; 052 node.label_finally_block_computed = false; 053 node.label_exception_handler_computed = false; 054 node.label_catch_end_computed = false; 055 node.handlesException_TypeDecl_values = null; 056 node.typeError_computed = false; 057 node.typeError_value = null; 058 node.typeRuntimeException_computed = false; 059 node.typeRuntimeException_value = null; 060 node.in$Circle(false); 061 node.is$Final(false); 062 return node; 063 } 064 /** 065 * @apilevel internal 066 */ 067 @SuppressWarnings({"unchecked", "cast"}) 068 public TryStmt copy() { 069 070 try { 071 TryStmt node = (TryStmt) clone(); 072 node.parent = null; 073 if(children != null) 074 node.children = (ASTNode[]) children.clone(); 075 076 return node; 077 } catch (CloneNotSupportedException e) { 078 throw new Error("Error: clone not supported for " + getClass().getName()); 079 } 080 081 }/** 082 * Create a deep copy of the AST subtree at this node. 083 * The copy is dangling, i.e. has no parent. 084 * @return dangling copy of the subtree at this node 085 * @apilevel low-level 086 */ 087 @SuppressWarnings({"unchecked", "cast"}) 088 public TryStmt fullCopy() { 089 090 TryStmt tree = (TryStmt) copy(); 091 if (children != null) { 092 for (int i = 0; i < children.length; ++i) { 093 094 ASTNode child = (ASTNode) children[i]; 095 if(child != null) { 096 child = child.fullCopy(); 097 tree.setChild(child, i); 098 } 099 } 100 } 101 return tree; 102 103 } /** 104 * @ast method 105 * @aspect BranchTarget 106 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/BranchTarget.jrag:60 107 */ 108 public void collectBranches(Collection c) { 109 c.addAll(escapedBranches()); 110 } 111 /** 112 * @ast method 113 * @aspect BranchTarget 114 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/BranchTarget.jrag:161 115 */ 116 public Stmt branchTarget(Stmt branchStmt) { 117 if(targetBranches().contains(branchStmt)) 118 return this; 119 return super.branchTarget(branchStmt); 120 } 121 /** 122 * @ast method 123 * @aspect BranchTarget 124 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/BranchTarget.jrag:199 125 */ 126 public void collectFinally(Stmt branchStmt, ArrayList list) { 127 if(hasFinally() && !branchesFromFinally().contains(branchStmt)) 128 list.add(this); 129 if(targetBranches().contains(branchStmt)) 130 return; 131 super.collectFinally(branchStmt, list); 132 } 133 /** 134 * @ast method 135 * @aspect ExceptionHandling 136 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:231 137 */ 138 protected boolean reachedException(TypeDecl type) { 139 boolean found = false; 140 // found is true if the exception type is caught by a catch clause 141 for(int i = 0; i < getNumCatchClause() && !found; i++) 142 if(getCatchClause(i).handles(type)) 143 found = true; 144 // if an exception is thrown in the block and the exception is not caught and 145 // either there is no finally block or the finally block can complete normally 146 if(!found && (!hasFinally() || getFinally().canCompleteNormally()) ) 147 if(getBlock().reachedException(type)) 148 return true; 149 // even if the exception is caught by the catch clauses they may 150 // throw new exceptions 151 for(int i = 0; i < getNumCatchClause(); i++) 152 if(getCatchClause(i).reachedException(type)) 153 return true; 154 return hasFinally() && getFinally().reachedException(type); 155 } 156 /** 157 * @ast method 158 * @aspect PrettyPrint 159 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:707 160 */ 161 public void toString(StringBuffer s) { 162 s.append(indent()); 163 s.append("try "); 164 getBlock().toString(s); 165 for(int i = 0; i < getNumCatchClause(); i++) { 166 s.append(indent()); 167 getCatchClause(i).toString(s); 168 } 169 if(hasFinally()) { 170 s.append(indent()); 171 s.append("finally "); 172 getFinally().toString(s); 173 } 174 } 175 /** 176 * @ast method 177 * @aspect CodeGeneration 178 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:795 179 */ 180 public void emitExceptionHandler(CodeGeneration gen) { 181 // add 1 to stack depth 182 gen.changeStackDepth(1); 183 int num = localNum(); 184 gen.emitStoreReference(num); 185 gen.emitJsr(label_finally_block()); 186 gen.emitLoadReference(num); 187 gen.emit(Bytecode.ATHROW); 188 } 189 /** 190 * @ast method 191 * @aspect CodeGeneration 192 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:805 193 */ 194 public void emitFinallyBlock(CodeGeneration gen) { 195 // add 1 to stack depth 196 gen.changeStackDepth(1); 197 int num = localNum()+1; 198 gen.emitStoreReference(num); 199 getFinally().createBCode(gen); 200 if(num < 256) 201 gen.emit(Bytecode.RET).add(num); 202 else 203 gen.emit(Bytecode.WIDE).emit(Bytecode.RET).add2(num); 204 } 205 /** 206 * @ast method 207 * @aspect CreateBCode 208 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1484 209 */ 210 public void createBCode(CodeGeneration gen) { 211 super.createBCode(gen); 212 gen.addLabel(label_begin()); 213 getBlock().createBCode(gen); 214 if(getBlock().canCompleteNormally()) 215 gen.emitGoto(label_finally()); 216 gen.addLabel(label_block_end()); 217 for(int i = 0; i < getNumCatchClause(); i++) { 218 getCatchClause(i).createBCode(gen); 219 if(getCatchClause(i).getBlock().canCompleteNormally()) { 220 if(!hasFinally()) 221 gen.emitGoto(label_finally()); 222 else 223 gen.emitGoto(label_catch_end()); 224 } 225 } 226 227 gen.addLabel(label_catch_end()); 228 if(hasFinally() && getNumCatchClause() > 0) { 229 gen.emitJsr(label_finally_block()); 230 if(canCompleteNormally()) 231 gen.emitGoto(label_end()); 232 } 233 234 gen.addLabel(label_finally()); 235 if(hasFinally()) { 236 if(getBlock().canCompleteNormally()) { 237 gen.emitJsr(label_finally_block()); 238 if(canCompleteNormally()) 239 gen.emitGoto(label_end()); 240 } 241 gen.addLabel(label_exception_handler()); 242 emitExceptionHandler(gen); 243 gen.addLabel(label_finally_block()); 244 emitFinallyBlock(gen); 245 } 246 gen.addLabel(label_end()); 247 gen.createExceptionTable(this); 248 } 249 /** 250 * @ast method 251 * 252 */ 253 public TryStmt() { 254 super(); 255 256 257 } 258 /** 259 * Initializes the child array to the correct size. 260 * Initializes List and Opt nta children. 261 * @apilevel internal 262 * @ast method 263 * @ast method 264 * 265 */ 266 public void init$Children() { 267 children = new ASTNode[3]; 268 setChild(new List(), 1); 269 setChild(new Opt(), 2); 270 } 271 /** 272 * @ast method 273 * 274 */ 275 public TryStmt(Block p0, List<CatchClause> p1, Opt<Block> p2) { 276 setChild(p0, 0); 277 setChild(p1, 1); 278 setChild(p2, 2); 279 } 280 /** 281 * @apilevel low-level 282 * @ast method 283 * 284 */ 285 protected int numChildren() { 286 return 3; 287 } 288 /** 289 * @apilevel internal 290 * @ast method 291 * 292 */ 293 public boolean mayHaveRewrite() { 294 return false; 295 } 296 /** 297 * Replaces the Block child. 298 * @param node The new node to replace the Block child. 299 * @apilevel high-level 300 * @ast method 301 * 302 */ 303 public void setBlock(Block node) { 304 setChild(node, 0); 305 } 306 /** 307 * Retrieves the Block child. 308 * @return The current node used as the Block child. 309 * @apilevel high-level 310 * @ast method 311 * 312 */ 313 public Block getBlock() { 314 return (Block)getChild(0); 315 } 316 /** 317 * Retrieves the Block child. 318 * <p><em>This method does not invoke AST transformations.</em></p> 319 * @return The current node used as the Block child. 320 * @apilevel low-level 321 * @ast method 322 * 323 */ 324 public Block getBlockNoTransform() { 325 return (Block)getChildNoTransform(0); 326 } 327 /** 328 * Replaces the CatchClause list. 329 * @param list The new list node to be used as the CatchClause list. 330 * @apilevel high-level 331 * @ast method 332 * 333 */ 334 public void setCatchClauseList(List<CatchClause> list) { 335 setChild(list, 1); 336 } 337 /** 338 * Retrieves the number of children in the CatchClause list. 339 * @return Number of children in the CatchClause list. 340 * @apilevel high-level 341 * @ast method 342 * 343 */ 344 public int getNumCatchClause() { 345 return getCatchClauseList().getNumChild(); 346 } 347 /** 348 * Retrieves the number of children in the CatchClause list. 349 * Calling this method will not trigger rewrites.. 350 * @return Number of children in the CatchClause list. 351 * @apilevel low-level 352 * @ast method 353 * 354 */ 355 public int getNumCatchClauseNoTransform() { 356 return getCatchClauseListNoTransform().getNumChildNoTransform(); 357 } 358 /** 359 * Retrieves the element at index {@code i} in the CatchClause list.. 360 * @param i Index of the element to return. 361 * @return The element at position {@code i} in the CatchClause list. 362 * @apilevel high-level 363 * @ast method 364 * 365 */ 366 @SuppressWarnings({"unchecked", "cast"}) 367 public CatchClause getCatchClause(int i) { 368 return (CatchClause)getCatchClauseList().getChild(i); 369 } 370 /** 371 * Append an element to the CatchClause list. 372 * @param node The element to append to the CatchClause list. 373 * @apilevel high-level 374 * @ast method 375 * 376 */ 377 public void addCatchClause(CatchClause node) { 378 List<CatchClause> list = (parent == null || state == null) ? getCatchClauseListNoTransform() : getCatchClauseList(); 379 list.addChild(node); 380 } 381 /** 382 * @apilevel low-level 383 * @ast method 384 * 385 */ 386 public void addCatchClauseNoTransform(CatchClause node) { 387 List<CatchClause> list = getCatchClauseListNoTransform(); 388 list.addChild(node); 389 } 390 /** 391 * Replaces the CatchClause list element at index {@code i} with the new node {@code node}. 392 * @param node The new node to replace the old list element. 393 * @param i The list index of the node to be replaced. 394 * @apilevel high-level 395 * @ast method 396 * 397 */ 398 public void setCatchClause(CatchClause node, int i) { 399 List<CatchClause> list = getCatchClauseList(); 400 list.setChild(node, i); 401 } 402 /** 403 * Retrieves the CatchClause list. 404 * @return The node representing the CatchClause list. 405 * @apilevel high-level 406 * @ast method 407 * 408 */ 409 public List<CatchClause> getCatchClauses() { 410 return getCatchClauseList(); 411 } 412 /** 413 * Retrieves the CatchClause list. 414 * <p><em>This method does not invoke AST transformations.</em></p> 415 * @return The node representing the CatchClause list. 416 * @apilevel low-level 417 * @ast method 418 * 419 */ 420 public List<CatchClause> getCatchClausesNoTransform() { 421 return getCatchClauseListNoTransform(); 422 } 423 /** 424 * Retrieves the CatchClause list. 425 * @return The node representing the CatchClause list. 426 * @apilevel high-level 427 * @ast method 428 * 429 */ 430 @SuppressWarnings({"unchecked", "cast"}) 431 public List<CatchClause> getCatchClauseList() { 432 List<CatchClause> list = (List<CatchClause>)getChild(1); 433 list.getNumChild(); 434 return list; 435 } 436 /** 437 * Retrieves the CatchClause list. 438 * <p><em>This method does not invoke AST transformations.</em></p> 439 * @return The node representing the CatchClause list. 440 * @apilevel low-level 441 * @ast method 442 * 443 */ 444 @SuppressWarnings({"unchecked", "cast"}) 445 public List<CatchClause> getCatchClauseListNoTransform() { 446 return (List<CatchClause>)getChildNoTransform(1); 447 } 448 /** 449 * Replaces the optional node for the Finally child. This is the {@code Opt} node containing the child Finally, not the actual child! 450 * @param opt The new node to be used as the optional node for the Finally child. 451 * @apilevel low-level 452 * @ast method 453 * 454 */ 455 public void setFinallyOpt(Opt<Block> opt) { 456 setChild(opt, 2); 457 } 458 /** 459 * Check whether the optional Finally child exists. 460 * @return {@code true} if the optional Finally child exists, {@code false} if it does not. 461 * @apilevel high-level 462 * @ast method 463 * 464 */ 465 public boolean hasFinally() { 466 return getFinallyOpt().getNumChild() != 0; 467 } 468 /** 469 * Retrieves the (optional) Finally child. 470 * @return The Finally child, if it exists. Returns {@code null} otherwise. 471 * @apilevel low-level 472 * @ast method 473 * 474 */ 475 @SuppressWarnings({"unchecked", "cast"}) 476 public Block getFinally() { 477 return (Block)getFinallyOpt().getChild(0); 478 } 479 /** 480 * Replaces the (optional) Finally child. 481 * @param node The new node to be used as the Finally child. 482 * @apilevel high-level 483 * @ast method 484 * 485 */ 486 public void setFinally(Block node) { 487 getFinallyOpt().setChild(node, 0); 488 } 489 /** 490 * @apilevel low-level 491 * @ast method 492 * 493 */ 494 @SuppressWarnings({"unchecked", "cast"}) 495 public Opt<Block> getFinallyOpt() { 496 return (Opt<Block>)getChild(2); 497 } 498 /** 499 * Retrieves the optional node for child Finally. This is the {@code Opt} node containing the child Finally, not the actual child! 500 * <p><em>This method does not invoke AST transformations.</em></p> 501 * @return The optional node for child Finally. 502 * @apilevel low-level 503 * @ast method 504 * 505 */ 506 @SuppressWarnings({"unchecked", "cast"}) 507 public Opt<Block> getFinallyOptNoTransform() { 508 return (Opt<Block>)getChildNoTransform(2); 509 } 510 /** 511 * @apilevel internal 512 */ 513 protected boolean branches_computed = false; 514 /** 515 * @apilevel internal 516 */ 517 protected Collection branches_value; 518 /** 519 * @attribute syn 520 * @aspect BranchTarget 521 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/BranchTarget.jrag:115 522 */ 523 @SuppressWarnings({"unchecked", "cast"}) 524 public Collection branches() { 525 if(branches_computed) { 526 return branches_value; 527 } 528 ASTNode$State state = state(); 529 int num = state.boundariesCrossed; 530 boolean isFinal = this.is$Final(); 531 branches_value = branches_compute(); 532 if(isFinal && num == state().boundariesCrossed){ branches_computed = true; } 533 return branches_value; 534 } 535 /** 536 * @apilevel internal 537 */ 538 private Collection branches_compute() { 539 HashSet set = new HashSet(); 540 getBlock().collectBranches(set); 541 for(int i = 0; i < getNumCatchClause(); i++) 542 getCatchClause(i).collectBranches(set); 543 return set; 544 } 545 /** 546 * @apilevel internal 547 */ 548 protected boolean branchesFromFinally_computed = false; 549 /** 550 * @apilevel internal 551 */ 552 protected Collection branchesFromFinally_value; 553 /** 554 * @attribute syn 555 * @aspect BranchTarget 556 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/BranchTarget.jrag:123 557 */ 558 @SuppressWarnings({"unchecked", "cast"}) 559 public Collection branchesFromFinally() { 560 if(branchesFromFinally_computed) { 561 return branchesFromFinally_value; 562 } 563 ASTNode$State state = state(); 564 int num = state.boundariesCrossed; 565 boolean isFinal = this.is$Final(); 566 branchesFromFinally_value = branchesFromFinally_compute(); 567 if(isFinal && num == state().boundariesCrossed){ branchesFromFinally_computed = true; } 568 return branchesFromFinally_value; 569 } 570 /** 571 * @apilevel internal 572 */ 573 private Collection branchesFromFinally_compute() { 574 HashSet set = new HashSet(); 575 if(hasFinally()) 576 getFinally().collectBranches(set); 577 return set; 578 } 579 /** 580 * @apilevel internal 581 */ 582 protected boolean targetBranches_computed = false; 583 /** 584 * @apilevel internal 585 */ 586 protected Collection targetBranches_value; 587 /** 588 * @attribute syn 589 * @aspect BranchTarget 590 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/BranchTarget.jrag:131 591 */ 592 @SuppressWarnings({"unchecked", "cast"}) 593 public Collection targetBranches() { 594 if(targetBranches_computed) { 595 return targetBranches_value; 596 } 597 ASTNode$State state = state(); 598 int num = state.boundariesCrossed; 599 boolean isFinal = this.is$Final(); 600 targetBranches_value = targetBranches_compute(); 601 if(isFinal && num == state().boundariesCrossed){ targetBranches_computed = true; } 602 return targetBranches_value; 603 } 604 /** 605 * @apilevel internal 606 */ 607 private Collection targetBranches_compute() { 608 HashSet set = new HashSet(); 609 if(hasFinally() && !getFinally().canCompleteNormally()) 610 set.addAll(branches()); 611 return set; 612 } 613 /** 614 * @apilevel internal 615 */ 616 protected boolean escapedBranches_computed = false; 617 /** 618 * @apilevel internal 619 */ 620 protected Collection escapedBranches_value; 621 /** 622 * @attribute syn 623 * @aspect BranchTarget 624 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/BranchTarget.jrag:139 625 */ 626 @SuppressWarnings({"unchecked", "cast"}) 627 public Collection escapedBranches() { 628 if(escapedBranches_computed) { 629 return escapedBranches_value; 630 } 631 ASTNode$State state = state(); 632 int num = state.boundariesCrossed; 633 boolean isFinal = this.is$Final(); 634 escapedBranches_value = escapedBranches_compute(); 635 if(isFinal && num == state().boundariesCrossed){ escapedBranches_computed = true; } 636 return escapedBranches_value; 637 } 638 /** 639 * @apilevel internal 640 */ 641 private Collection escapedBranches_compute() { 642 HashSet set = new HashSet(); 643 if(hasFinally()) 644 set.addAll(branchesFromFinally()); 645 if(!hasFinally() || getFinally().canCompleteNormally()) 646 set.addAll(branches()); 647 return set; 648 } 649 protected java.util.Map isDAafter_Variable_values; 650 /** 651 * @attribute syn 652 * @aspect DA 653 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:666 654 */ 655 @SuppressWarnings({"unchecked", "cast"}) 656 public boolean isDAafter(Variable v) { 657 Object _parameters = v; 658 if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4); 659 if(isDAafter_Variable_values.containsKey(_parameters)) { 660 return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue(); 661 } 662 ASTNode$State state = state(); 663 int num = state.boundariesCrossed; 664 boolean isFinal = this.is$Final(); 665 boolean isDAafter_Variable_value = isDAafter_compute(v); 666 if(isFinal && num == state().boundariesCrossed){ isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value)); } 667 return isDAafter_Variable_value; 668 } 669 /** 670 * @apilevel internal 671 */ 672 private boolean isDAafter_compute(Variable v) { 673 // 16.2.15 4th bullet 674 if(!hasFinally()) { 675 if(!getBlock().isDAafter(v)) 676 return false; 677 for(int i = 0; i < getNumCatchClause(); i++) 678 if(!getCatchClause(i).getBlock().isDAafter(v)) 679 return false; 680 return true; 681 } 682 else { 683 // 16.2.15 5th bullet 684 if(getFinally().isDAafter(v)) 685 return true; 686 if(!getBlock().isDAafter(v)) 687 return false; 688 for(int i = 0; i < getNumCatchClause(); i++) 689 if(!getCatchClause(i).getBlock().isDAafter(v)) 690 return false; 691 return true; 692 } 693 } 694 /** 695 * @attribute syn 696 * @aspect DU 697 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:914 698 */ 699 public boolean isDUafterFinally(Variable v) { 700 ASTNode$State state = state(); 701 try { return getFinally().isDUafter(v); } 702 finally { 703 } 704 } 705 /** 706 * @attribute syn 707 * @aspect DU 708 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:917 709 */ 710 public boolean isDAafterFinally(Variable v) { 711 ASTNode$State state = state(); 712 try { return getFinally().isDAafter(v); } 713 finally { 714 } 715 } 716 protected java.util.Map isDUbefore_Variable_values; 717 /** 718 * @attribute syn 719 * @aspect DU 720 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:1185 721 */ 722 @SuppressWarnings({"unchecked", "cast"}) 723 public boolean isDUbefore(Variable v) { 724 Object _parameters = v; 725 if(isDUbefore_Variable_values == null) isDUbefore_Variable_values = new java.util.HashMap(4); 726 ASTNode$State.CircularValue _value; 727 if(isDUbefore_Variable_values.containsKey(_parameters)) { 728 Object _o = isDUbefore_Variable_values.get(_parameters); 729 if(!(_o instanceof ASTNode$State.CircularValue)) { 730 return ((Boolean)_o).booleanValue(); 731 } 732 else 733 _value = (ASTNode$State.CircularValue)_o; 734 } 735 else { 736 _value = new ASTNode$State.CircularValue(); 737 isDUbefore_Variable_values.put(_parameters, _value); 738 _value.value = Boolean.valueOf(true); 739 } 740 ASTNode$State state = state(); 741 if (!state.IN_CIRCLE) { 742 state.IN_CIRCLE = true; 743 int num = state.boundariesCrossed; 744 boolean isFinal = this.is$Final(); 745 boolean new_isDUbefore_Variable_value; 746 do { 747 _value.visited = new Integer(state.CIRCLE_INDEX); 748 state.CHANGE = false; 749 new_isDUbefore_Variable_value = isDUbefore_compute(v); 750 if (new_isDUbefore_Variable_value!=((Boolean)_value.value).booleanValue()) { 751 state.CHANGE = true; 752 _value.value = Boolean.valueOf(new_isDUbefore_Variable_value); 753 } 754 state.CIRCLE_INDEX++; 755 } while (state.CHANGE); 756 if(isFinal && num == state().boundariesCrossed) { 757 isDUbefore_Variable_values.put(_parameters, new_isDUbefore_Variable_value); 758 } 759 else { 760 isDUbefore_Variable_values.remove(_parameters); 761 state.RESET_CYCLE = true; 762 isDUbefore_compute(v); 763 state.RESET_CYCLE = false; 764 } 765 state.IN_CIRCLE = false; 766 return new_isDUbefore_Variable_value; 767 } 768 if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { 769 _value.visited = new Integer(state.CIRCLE_INDEX); 770 boolean new_isDUbefore_Variable_value = isDUbefore_compute(v); 771 if (state.RESET_CYCLE) { 772 isDUbefore_Variable_values.remove(_parameters); 773 } 774 else if (new_isDUbefore_Variable_value!=((Boolean)_value.value).booleanValue()) { 775 state.CHANGE = true; 776 _value.value = new_isDUbefore_Variable_value; 777 } 778 return new_isDUbefore_Variable_value; 779 } 780 return ((Boolean)_value.value).booleanValue(); 781 } 782 /** 783 * @apilevel internal 784 */ 785 private boolean isDUbefore_compute(Variable v) { return super.isDUbefore(v); } 786 protected java.util.Map isDUafter_Variable_values; 787 /** 788 * @attribute syn 789 * @aspect DU 790 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:1221 791 */ 792 @SuppressWarnings({"unchecked", "cast"}) 793 public boolean isDUafter(Variable v) { 794 Object _parameters = v; 795 if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4); 796 if(isDUafter_Variable_values.containsKey(_parameters)) { 797 return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue(); 798 } 799 ASTNode$State state = state(); 800 int num = state.boundariesCrossed; 801 boolean isFinal = this.is$Final(); 802 boolean isDUafter_Variable_value = isDUafter_compute(v); 803 if(isFinal && num == state().boundariesCrossed){ isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value)); } 804 return isDUafter_Variable_value; 805 } 806 /** 807 * @apilevel internal 808 */ 809 private boolean isDUafter_compute(Variable v) { 810 // 16.2.14 4th bullet 811 if(!hasFinally()) { 812 if(!getBlock().isDUafter(v)) 813 return false; 814 for(int i = 0; i < getNumCatchClause(); i++) 815 if(!getCatchClause(i).getBlock().isDUafter(v)) 816 return false; 817 return true; 818 } 819 else 820 return getFinally().isDUafter(v); 821 } 822 protected java.util.Map catchableException_TypeDecl_values; 823 /** 824 * The block of the try statement can throw an exception of 825 * a type assignable to the given type. 826 * @attribute syn 827 * @aspect ExceptionHandling 828 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:221 829 */ 830 @SuppressWarnings({"unchecked", "cast"}) 831 public boolean catchableException(TypeDecl type) { 832 Object _parameters = type; 833 if(catchableException_TypeDecl_values == null) catchableException_TypeDecl_values = new java.util.HashMap(4); 834 if(catchableException_TypeDecl_values.containsKey(_parameters)) { 835 return ((Boolean)catchableException_TypeDecl_values.get(_parameters)).booleanValue(); 836 } 837 ASTNode$State state = state(); 838 int num = state.boundariesCrossed; 839 boolean isFinal = this.is$Final(); 840 boolean catchableException_TypeDecl_value = catchableException_compute(type); 841 if(isFinal && num == state().boundariesCrossed){ catchableException_TypeDecl_values.put(_parameters, Boolean.valueOf(catchableException_TypeDecl_value)); } 842 return catchableException_TypeDecl_value; 843 } 844 /** 845 * @apilevel internal 846 */ 847 private boolean catchableException_compute(TypeDecl type) { return getBlock().reachedException(type); } 848 /** 849 * @apilevel internal 850 */ 851 protected boolean canCompleteNormally_computed = false; 852 /** 853 * @apilevel internal 854 */ 855 protected boolean canCompleteNormally_value; 856 /** 857 * @attribute syn 858 * @aspect UnreachableStatements 859 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:113 860 */ 861 @SuppressWarnings({"unchecked", "cast"}) 862 public boolean canCompleteNormally() { 863 if(canCompleteNormally_computed) { 864 return canCompleteNormally_value; 865 } 866 ASTNode$State state = state(); 867 int num = state.boundariesCrossed; 868 boolean isFinal = this.is$Final(); 869 canCompleteNormally_value = canCompleteNormally_compute(); 870 if(isFinal && num == state().boundariesCrossed){ canCompleteNormally_computed = true; } 871 return canCompleteNormally_value; 872 } 873 /** 874 * @apilevel internal 875 */ 876 private boolean canCompleteNormally_compute() { 877 boolean anyCatchClauseCompleteNormally = false; 878 for(int i = 0; i < getNumCatchClause() && !anyCatchClauseCompleteNormally; i++) 879 anyCatchClauseCompleteNormally = getCatchClause(i).getBlock().canCompleteNormally(); 880 return (getBlock().canCompleteNormally() || anyCatchClauseCompleteNormally) && 881 (!hasFinally() || getFinally().canCompleteNormally()); 882 } 883 /** 884 * @attribute syn 885 * @aspect CreateBCode 886 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1398 887 */ 888 public int break_label() { 889 ASTNode$State state = state(); 890 try { return label_finally(); } 891 finally { 892 } 893 } 894 /** 895 * @attribute syn 896 * @aspect CreateBCode 897 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1417 898 */ 899 public int continue_label() { 900 ASTNode$State state = state(); 901 try { return label_finally(); } 902 finally { 903 } 904 } 905 /** 906 * @apilevel internal 907 */ 908 protected boolean label_begin_computed = false; 909 /** 910 * @apilevel internal 911 */ 912 protected int label_begin_value; 913 /** 914 * @attribute syn 915 * @aspect CreateBCode 916 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1476 917 */ 918 @SuppressWarnings({"unchecked", "cast"}) 919 public int label_begin() { 920 if(label_begin_computed) { 921 return label_begin_value; 922 } 923 ASTNode$State state = state(); 924 int num = state.boundariesCrossed; 925 boolean isFinal = this.is$Final(); 926 label_begin_value = label_begin_compute(); 927 if(isFinal && num == state().boundariesCrossed){ label_begin_computed = true; } 928 return label_begin_value; 929 } 930 /** 931 * @apilevel internal 932 */ 933 private int label_begin_compute() { return hostType().constantPool().newLabel(); } 934 /** 935 * @apilevel internal 936 */ 937 protected boolean label_block_end_computed = false; 938 /** 939 * @apilevel internal 940 */ 941 protected int label_block_end_value; 942 /** 943 * @attribute syn 944 * @aspect CreateBCode 945 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1477 946 */ 947 @SuppressWarnings({"unchecked", "cast"}) 948 public int label_block_end() { 949 if(label_block_end_computed) { 950 return label_block_end_value; 951 } 952 ASTNode$State state = state(); 953 int num = state.boundariesCrossed; 954 boolean isFinal = this.is$Final(); 955 label_block_end_value = label_block_end_compute(); 956 if(isFinal && num == state().boundariesCrossed){ label_block_end_computed = true; } 957 return label_block_end_value; 958 } 959 /** 960 * @apilevel internal 961 */ 962 private int label_block_end_compute() { return hostType().constantPool().newLabel(); } 963 /** 964 * @apilevel internal 965 */ 966 protected boolean label_end_computed = false; 967 /** 968 * @apilevel internal 969 */ 970 protected int label_end_value; 971 /** 972 * @attribute syn 973 * @aspect CreateBCode 974 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1478 975 */ 976 @SuppressWarnings({"unchecked", "cast"}) 977 public int label_end() { 978 if(label_end_computed) { 979 return label_end_value; 980 } 981 ASTNode$State state = state(); 982 int num = state.boundariesCrossed; 983 boolean isFinal = this.is$Final(); 984 label_end_value = label_end_compute(); 985 if(isFinal && num == state().boundariesCrossed){ label_end_computed = true; } 986 return label_end_value; 987 } 988 /** 989 * @apilevel internal 990 */ 991 private int label_end_compute() { return hostType().constantPool().newLabel(); } 992 /** 993 * @apilevel internal 994 */ 995 protected boolean label_finally_computed = false; 996 /** 997 * @apilevel internal 998 */ 999 protected int label_finally_value; 1000 /** 1001 * @attribute syn 1002 * @aspect CreateBCode 1003 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1479 1004 */ 1005 @SuppressWarnings({"unchecked", "cast"}) 1006 public int label_finally() { 1007 if(label_finally_computed) { 1008 return label_finally_value; 1009 } 1010 ASTNode$State state = state(); 1011 int num = state.boundariesCrossed; 1012 boolean isFinal = this.is$Final(); 1013 label_finally_value = label_finally_compute(); 1014 if(isFinal && num == state().boundariesCrossed){ label_finally_computed = true; } 1015 return label_finally_value; 1016 } 1017 /** 1018 * @apilevel internal 1019 */ 1020 private int label_finally_compute() { return hostType().constantPool().newLabel(); } 1021 /** 1022 * @apilevel internal 1023 */ 1024 protected boolean label_finally_block_computed = false; 1025 /** 1026 * @apilevel internal 1027 */ 1028 protected int label_finally_block_value; 1029 /** 1030 * @attribute syn 1031 * @aspect CreateBCode 1032 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1480 1033 */ 1034 @SuppressWarnings({"unchecked", "cast"}) 1035 public int label_finally_block() { 1036 if(label_finally_block_computed) { 1037 return label_finally_block_value; 1038 } 1039 ASTNode$State state = state(); 1040 int num = state.boundariesCrossed; 1041 boolean isFinal = this.is$Final(); 1042 label_finally_block_value = label_finally_block_compute(); 1043 if(isFinal && num == state().boundariesCrossed){ label_finally_block_computed = true; } 1044 return label_finally_block_value; 1045 } 1046 /** 1047 * @apilevel internal 1048 */ 1049 private int label_finally_block_compute() { return hostType().constantPool().newLabel(); } 1050 /** 1051 * @apilevel internal 1052 */ 1053 protected boolean label_exception_handler_computed = false; 1054 /** 1055 * @apilevel internal 1056 */ 1057 protected int label_exception_handler_value; 1058 /** 1059 * @attribute syn 1060 * @aspect CreateBCode 1061 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1481 1062 */ 1063 @SuppressWarnings({"unchecked", "cast"}) 1064 public int label_exception_handler() { 1065 if(label_exception_handler_computed) { 1066 return label_exception_handler_value; 1067 } 1068 ASTNode$State state = state(); 1069 int num = state.boundariesCrossed; 1070 boolean isFinal = this.is$Final(); 1071 label_exception_handler_value = label_exception_handler_compute(); 1072 if(isFinal && num == state().boundariesCrossed){ label_exception_handler_computed = true; } 1073 return label_exception_handler_value; 1074 } 1075 /** 1076 * @apilevel internal 1077 */ 1078 private int label_exception_handler_compute() { return hostType().constantPool().newLabel(); } 1079 /** 1080 * @apilevel internal 1081 */ 1082 protected boolean label_catch_end_computed = false; 1083 /** 1084 * @apilevel internal 1085 */ 1086 protected int label_catch_end_value; 1087 /** 1088 * @attribute syn 1089 * @aspect CreateBCode 1090 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:1482 1091 */ 1092 @SuppressWarnings({"unchecked", "cast"}) 1093 public int label_catch_end() { 1094 if(label_catch_end_computed) { 1095 return label_catch_end_value; 1096 } 1097 ASTNode$State state = state(); 1098 int num = state.boundariesCrossed; 1099 boolean isFinal = this.is$Final(); 1100 label_catch_end_value = label_catch_end_compute(); 1101 if(isFinal && num == state().boundariesCrossed){ label_catch_end_computed = true; } 1102 return label_catch_end_value; 1103 } 1104 /** 1105 * @apilevel internal 1106 */ 1107 private int label_catch_end_compute() { return hostType().constantPool().newLabel(); } 1108 /** 1109 * @attribute syn 1110 * @aspect PreciseRethrow 1111 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/PreciseRethrow.jrag:55 1112 */ 1113 public boolean modifiedInScope(Variable var) { 1114 ASTNode$State state = state(); 1115 try { 1116 if (getBlock().modifiedInScope(var)) 1117 return true; 1118 for (CatchClause cc : getCatchClauseList()) 1119 if (cc.modifiedInScope(var)) 1120 return true; 1121 return hasFinally() && getFinally().modifiedInScope(var); 1122 } 1123 finally { 1124 } 1125 } 1126 protected java.util.Map handlesException_TypeDecl_values; 1127 /** 1128 * @attribute inh 1129 * @aspect ExceptionHandling 1130 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:49 1131 */ 1132 @SuppressWarnings({"unchecked", "cast"}) 1133 public boolean handlesException(TypeDecl exceptionType) { 1134 Object _parameters = exceptionType; 1135 if(handlesException_TypeDecl_values == null) handlesException_TypeDecl_values = new java.util.HashMap(4); 1136 if(handlesException_TypeDecl_values.containsKey(_parameters)) { 1137 return ((Boolean)handlesException_TypeDecl_values.get(_parameters)).booleanValue(); 1138 } 1139 ASTNode$State state = state(); 1140 int num = state.boundariesCrossed; 1141 boolean isFinal = this.is$Final(); 1142 boolean handlesException_TypeDecl_value = getParent().Define_boolean_handlesException(this, null, exceptionType); 1143 if(isFinal && num == state().boundariesCrossed){ handlesException_TypeDecl_values.put(_parameters, Boolean.valueOf(handlesException_TypeDecl_value)); } 1144 return handlesException_TypeDecl_value; 1145 } 1146 /** 1147 * @apilevel internal 1148 */ 1149 protected boolean typeError_computed = false; 1150 /** 1151 * @apilevel internal 1152 */ 1153 protected TypeDecl typeError_value; 1154 /** 1155 * @attribute inh 1156 * @aspect UnreachableStatements 1157 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:138 1158 */ 1159 @SuppressWarnings({"unchecked", "cast"}) 1160 public TypeDecl typeError() { 1161 if(typeError_computed) { 1162 return typeError_value; 1163 } 1164 ASTNode$State state = state(); 1165 int num = state.boundariesCrossed; 1166 boolean isFinal = this.is$Final(); 1167 typeError_value = getParent().Define_TypeDecl_typeError(this, null); 1168 if(isFinal && num == state().boundariesCrossed){ typeError_computed = true; } 1169 return typeError_value; 1170 } 1171 /** 1172 * @apilevel internal 1173 */ 1174 protected boolean typeRuntimeException_computed = false; 1175 /** 1176 * @apilevel internal 1177 */ 1178 protected TypeDecl typeRuntimeException_value; 1179 /** 1180 * @attribute inh 1181 * @aspect UnreachableStatements 1182 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:139 1183 */ 1184 @SuppressWarnings({"unchecked", "cast"}) 1185 public TypeDecl typeRuntimeException() { 1186 if(typeRuntimeException_computed) { 1187 return typeRuntimeException_value; 1188 } 1189 ASTNode$State state = state(); 1190 int num = state.boundariesCrossed; 1191 boolean isFinal = this.is$Final(); 1192 typeRuntimeException_value = getParent().Define_TypeDecl_typeRuntimeException(this, null); 1193 if(isFinal && num == state().boundariesCrossed){ typeRuntimeException_computed = true; } 1194 return typeRuntimeException_value; 1195 } 1196 /** 1197 * @attribute inh 1198 * @aspect CodeGeneration 1199 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:793 1200 */ 1201 @SuppressWarnings({"unchecked", "cast"}) 1202 public TypeDecl typeThrowable() { 1203 ASTNode$State state = state(); 1204 TypeDecl typeThrowable_value = getParent().Define_TypeDecl_typeThrowable(this, null); 1205 return typeThrowable_value; 1206 } 1207 /** 1208 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:665 1209 * @apilevel internal 1210 */ 1211 public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { 1212 if(caller == getFinallyOptNoTransform()) { 1213 return isDAbefore(v); 1214 } 1215 else if(caller == getCatchClauseListNoTransform()) { 1216 int childIndex = caller.getIndexOfChild(child); 1217 return getBlock().isDAbefore(v); 1218 } 1219 else if(caller == getBlockNoTransform()) { 1220 return isDAbefore(v); 1221 } 1222 else { return getParent().Define_boolean_isDAbefore(this, caller, v); 1223 } 1224 } 1225 /** 1226 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:1212 1227 * @apilevel internal 1228 */ 1229 public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { 1230 if(caller == getFinallyOptNoTransform()){ 1231 if(!getBlock().isDUeverywhere(v)) 1232 return false; 1233 for(int i = 0; i < getNumCatchClause(); i++) 1234 if(!getCatchClause(i).getBlock().unassignedEverywhere(v, this)) 1235 return false; 1236 return true; 1237 } 1238 else if(caller == getCatchClauseListNoTransform()) { 1239 int childIndex = caller.getIndexOfChild(child); 1240 { 1241 if(!getBlock().isDUafter(v)) 1242 return false; 1243 if(!getBlock().isDUeverywhere(v)) 1244 return false; 1245 return true; 1246 } 1247 } 1248 else if(caller == getBlockNoTransform()) { 1249 return isDUbefore(v); 1250 } 1251 else { return getParent().Define_boolean_isDUbefore(this, caller, v); 1252 } 1253 } 1254 /** 1255 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:202 1256 * @apilevel internal 1257 */ 1258 public boolean Define_boolean_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) { 1259 if(caller == getBlockNoTransform()){ 1260 for(int i = 0; i < getNumCatchClause(); i++) 1261 if(getCatchClause(i).handles(exceptionType)) 1262 return true; 1263 if(hasFinally() && !getFinally().canCompleteNormally()) 1264 return true; 1265 return handlesException(exceptionType); 1266 } 1267 else if(caller == getCatchClauseListNoTransform()) { 1268 int childIndex = caller.getIndexOfChild(child); 1269 { 1270 if(hasFinally() && !getFinally().canCompleteNormally()) 1271 return true; 1272 return handlesException(exceptionType); 1273 } 1274 } 1275 else { return getParent().Define_boolean_handlesException(this, caller, exceptionType); 1276 } 1277 } 1278 /** 1279 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:121 1280 * @apilevel internal 1281 */ 1282 public boolean Define_boolean_reachable(ASTNode caller, ASTNode child) { 1283 if(caller == getFinallyOptNoTransform()) { 1284 return reachable(); 1285 } 1286 else if(caller == getBlockNoTransform()) { 1287 return reachable(); 1288 } 1289 else { return getParent().Define_boolean_reachable(this, caller); 1290 } 1291 } 1292 /** 1293 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:128 1294 * @apilevel internal 1295 */ 1296 public boolean Define_boolean_reachableCatchClause(ASTNode caller, ASTNode child, TypeDecl exceptionType) { 1297 if(caller == getCatchClauseListNoTransform()) { 1298 int childIndex = caller.getIndexOfChild(child); 1299 { 1300 for(int i = 0; i < childIndex; i++) 1301 if(getCatchClause(i).handles(exceptionType)) 1302 return false; 1303 if(catchableException(exceptionType)) 1304 return true; 1305 if(exceptionType.mayCatch(typeError()) || exceptionType.mayCatch(typeRuntimeException())) 1306 return true; 1307 return false; 1308 } 1309 } 1310 else { return getParent().Define_boolean_reachableCatchClause(this, caller, exceptionType); 1311 } 1312 } 1313 /** 1314 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:156 1315 * @apilevel internal 1316 */ 1317 public boolean Define_boolean_reportUnreachable(ASTNode caller, ASTNode child) { 1318 if(caller == getFinallyOptNoTransform()) { 1319 return reachable(); 1320 } 1321 else if(caller == getCatchClauseListNoTransform()) { 1322 int childIndex = caller.getIndexOfChild(child); 1323 return reachable(); 1324 } 1325 else if(caller == getBlockNoTransform()) { 1326 return reachable(); 1327 } 1328 else { return getParent().Define_boolean_reportUnreachable(this, caller); 1329 } 1330 } 1331 /** 1332 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/LocalNum.jrag:118 1333 * @apilevel internal 1334 */ 1335 public int Define_int_localNum(ASTNode caller, ASTNode child) { 1336 if(caller == getFinallyOptNoTransform()) { 1337 return localNum() + 2; 1338 } 1339 else { return getParent().Define_int_localNum(this, caller); 1340 } 1341 } 1342 /** 1343 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/PreciseRethrow.jrag:138 1344 * @apilevel internal 1345 */ 1346 public Collection<TypeDecl> Define_Collection_TypeDecl__caughtExceptions(ASTNode caller, ASTNode child) { 1347 if(caller == getCatchClauseListNoTransform()) { 1348 int index = caller.getIndexOfChild(child); 1349 { 1350 Collection<TypeDecl> excp = new HashSet<TypeDecl>(); 1351 getBlock().collectExceptions(excp, this); 1352 Collection<TypeDecl> caught = new LinkedList<TypeDecl>(); 1353 Iterator<TypeDecl> iter = excp.iterator(); 1354 while (iter.hasNext()) { 1355 TypeDecl exception = iter.next(); 1356 // this catch clause handles the exception 1357 if (!getCatchClause(index).handles(exception)) 1358 continue; 1359 // no previous catch clause handles the exception 1360 boolean already = false; 1361 for (int i = 0; i < index; ++i) { 1362 if (getCatchClause(i).handles(exception)) { 1363 already = true; 1364 break; 1365 } 1366 } 1367 if (!already) { 1368 caught.add(exception); 1369 } 1370 } 1371 return caught; 1372 } 1373 } 1374 else { return getParent().Define_Collection_TypeDecl__caughtExceptions(this, caller); 1375 } 1376 } 1377 /** 1378 * @apilevel internal 1379 */ 1380 public ASTNode rewriteTo() { 1381 return super.rewriteTo(); 1382 } 1383 }