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 * A catch parameter with disjunct exception type. 015 * @production CatchParameterDeclaration : {@link ASTNode} ::= <span class="component">{@link Modifiers}</span> <span class="component">TypeAccess:{@link Access}*</span> <span class="component"><ID:String></span>; 016 * @ast node 017 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.ast:19 018 */ 019 public class CatchParameterDeclaration extends ASTNode<ASTNode> implements Cloneable, Variable, SimpleSet, Iterator { 020 /** 021 * @apilevel low-level 022 */ 023 public void flushCache() { 024 } 025 /** 026 * @apilevel internal 027 */ 028 public void flushCollectionCache() { 029 } 030 /** 031 * @apilevel internal 032 */ 033 @SuppressWarnings({"unchecked", "cast"}) 034 public CatchParameterDeclaration clone() throws CloneNotSupportedException { 035 CatchParameterDeclaration node = (CatchParameterDeclaration)super.clone(); 036 node.sourceVariableDecl_computed = false; 037 node.sourceVariableDecl_value = null; 038 node.throwTypes_computed = false; 039 node.throwTypes_value = null; 040 node.localNum_computed = false; 041 node.in$Circle(false); 042 node.is$Final(false); 043 return node; 044 } 045 /** 046 * @apilevel internal 047 */ 048 @SuppressWarnings({"unchecked", "cast"}) 049 public CatchParameterDeclaration copy() { 050 051 try { 052 CatchParameterDeclaration node = (CatchParameterDeclaration) clone(); 053 node.parent = null; 054 if(children != null) 055 node.children = (ASTNode[]) children.clone(); 056 057 return node; 058 } catch (CloneNotSupportedException e) { 059 throw new Error("Error: clone not supported for " + getClass().getName()); 060 } 061 062 }/** 063 * Create a deep copy of the AST subtree at this node. 064 * The copy is dangling, i.e. has no parent. 065 * @return dangling copy of the subtree at this node 066 * @apilevel low-level 067 */ 068 @SuppressWarnings({"unchecked", "cast"}) 069 public CatchParameterDeclaration fullCopy() { 070 071 CatchParameterDeclaration tree = (CatchParameterDeclaration) copy(); 072 if (children != null) { 073 for (int i = 0; i < children.length; ++i) { 074 075 ASTNode child = (ASTNode) children[i]; 076 if(child != null) { 077 child = child.fullCopy(); 078 tree.setChild(child, i); 079 } 080 } 081 } 082 return tree; 083 084 } /** 085 * @ast method 086 * @aspect MultiCatch 087 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:63 088 */ 089 public SimpleSet add(Object o) { 090 return new SimpleSetImpl().add(this).add(o); 091 } 092 /** 093 * @ast method 094 * @aspect MultiCatch 095 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:67 096 */ 097 public boolean isSingleton() { return true; } 098 /** 099 * @ast method 100 * @aspect MultiCatch 101 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:68 102 */ 103 public boolean isSingleton(Object o) { return contains(o); } 104 /** 105 * @ast method 106 * @aspect MultiCatch 107 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:71 108 */ 109 110 private CatchParameterDeclaration iterElem; 111 /** 112 * @ast method 113 * @aspect MultiCatch 114 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:72 115 */ 116 public Iterator iterator() { iterElem = this; return this; } 117 /** 118 * @ast method 119 * @aspect MultiCatch 120 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:73 121 */ 122 public boolean hasNext() { return iterElem != null; } 123 /** 124 * @ast method 125 * @aspect MultiCatch 126 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:74 127 */ 128 public Object next() { Object o = iterElem; iterElem = null; return o; } 129 /** 130 * @ast method 131 * @aspect MultiCatch 132 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:75 133 */ 134 public void remove() { throw new UnsupportedOperationException(); } 135 /** 136 * Type checking. 137 * The types given in a disjunction type may not be 138 * subtypes of each other. 139 * @ast method 140 * @aspect MultiCatch 141 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:109 142 */ 143 public void typeCheck() { 144 boolean pass = true; 145 for (int i = 0; i < getNumTypeAccess(); ++i) { 146 for (int j = 0; j < getNumTypeAccess(); ++j) { 147 if (i == j) continue; 148 TypeDecl t1 = getTypeAccess(i).type(); 149 TypeDecl t2 = getTypeAccess(j).type(); 150 if (t2.instanceOf(t1)) { 151 error(t2.fullName() + " is a subclass of " + 152 t1.fullName()); 153 pass = false; 154 } 155 } 156 } 157 } 158 /** 159 * Pretty printing of catch parameter declaration. 160 * @ast method 161 * @aspect MultiCatch 162 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:156 163 */ 164 public void toString(StringBuffer sb) { 165 getModifiers().toString(sb); 166 for (int i = 0; i < getNumTypeAccess(); ++i) { 167 if (i > 0) sb.append(" | "); 168 getTypeAccess(i).toString(sb); 169 } 170 sb.append(" "+getID()); 171 } 172 /** 173 * Duplicate declaration checking for catch parameters. 174 * @ast method 175 * @aspect MultiCatch 176 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:186 177 */ 178 public void nameCheck() { 179 SimpleSet decls = outerScope().lookupVariable(name()); 180 for(Iterator iter = decls.iterator(); iter.hasNext(); ) { 181 Variable var = (Variable)iter.next(); 182 if (var instanceof VariableDeclaration) { 183 VariableDeclaration decl = (VariableDeclaration)var; 184 if (decl.enclosingBodyDecl() == enclosingBodyDecl()) 185 error("duplicate declaration of "+ 186 "catch parameter "+name()); 187 } else if (var instanceof ParameterDeclaration) { 188 ParameterDeclaration decl = (ParameterDeclaration)var; 189 if (decl.enclosingBodyDecl() == enclosingBodyDecl()) 190 error("duplicate declaration of "+ 191 "catch parameter "+name()); 192 } else if (var instanceof CatchParameterDeclaration) { 193 CatchParameterDeclaration decl = (CatchParameterDeclaration)var; 194 if (decl.enclosingBodyDecl() == enclosingBodyDecl()) 195 error("duplicate declaration of "+ 196 "catch parameter "+name()); 197 } 198 } 199 200 // 8.4.1 201 if (!lookupVariable(name()).contains(this)) 202 error("duplicate declaration of catch parameter " + 203 name()); 204 } 205 /** 206 * @ast method 207 * 208 */ 209 public CatchParameterDeclaration() { 210 super(); 211 212 213 } 214 /** 215 * Initializes the child array to the correct size. 216 * Initializes List and Opt nta children. 217 * @apilevel internal 218 * @ast method 219 * @ast method 220 * 221 */ 222 public void init$Children() { 223 children = new ASTNode[2]; 224 setChild(new List(), 1); 225 } 226 /** 227 * @ast method 228 * 229 */ 230 public CatchParameterDeclaration(Modifiers p0, List<Access> p1, String p2) { 231 setChild(p0, 0); 232 setChild(p1, 1); 233 setID(p2); 234 } 235 /** 236 * @ast method 237 * 238 */ 239 public CatchParameterDeclaration(Modifiers p0, List<Access> p1, beaver.Symbol p2) { 240 setChild(p0, 0); 241 setChild(p1, 1); 242 setID(p2); 243 } 244 /** 245 * @apilevel low-level 246 * @ast method 247 * 248 */ 249 protected int numChildren() { 250 return 2; 251 } 252 /** 253 * @apilevel internal 254 * @ast method 255 * 256 */ 257 public boolean mayHaveRewrite() { 258 return false; 259 } 260 /** 261 * Replaces the Modifiers child. 262 * @param node The new node to replace the Modifiers child. 263 * @apilevel high-level 264 * @ast method 265 * 266 */ 267 public void setModifiers(Modifiers node) { 268 setChild(node, 0); 269 } 270 /** 271 * Retrieves the Modifiers child. 272 * @return The current node used as the Modifiers child. 273 * @apilevel high-level 274 * @ast method 275 * 276 */ 277 public Modifiers getModifiers() { 278 return (Modifiers)getChild(0); 279 } 280 /** 281 * Retrieves the Modifiers child. 282 * <p><em>This method does not invoke AST transformations.</em></p> 283 * @return The current node used as the Modifiers child. 284 * @apilevel low-level 285 * @ast method 286 * 287 */ 288 public Modifiers getModifiersNoTransform() { 289 return (Modifiers)getChildNoTransform(0); 290 } 291 /** 292 * Replaces the TypeAccess list. 293 * @param list The new list node to be used as the TypeAccess list. 294 * @apilevel high-level 295 * @ast method 296 * 297 */ 298 public void setTypeAccessList(List<Access> list) { 299 setChild(list, 1); 300 } 301 /** 302 * Retrieves the number of children in the TypeAccess list. 303 * @return Number of children in the TypeAccess list. 304 * @apilevel high-level 305 * @ast method 306 * 307 */ 308 public int getNumTypeAccess() { 309 return getTypeAccessList().getNumChild(); 310 } 311 /** 312 * Retrieves the number of children in the TypeAccess list. 313 * Calling this method will not trigger rewrites.. 314 * @return Number of children in the TypeAccess list. 315 * @apilevel low-level 316 * @ast method 317 * 318 */ 319 public int getNumTypeAccessNoTransform() { 320 return getTypeAccessListNoTransform().getNumChildNoTransform(); 321 } 322 /** 323 * Retrieves the element at index {@code i} in the TypeAccess list.. 324 * @param i Index of the element to return. 325 * @return The element at position {@code i} in the TypeAccess list. 326 * @apilevel high-level 327 * @ast method 328 * 329 */ 330 @SuppressWarnings({"unchecked", "cast"}) 331 public Access getTypeAccess(int i) { 332 return (Access)getTypeAccessList().getChild(i); 333 } 334 /** 335 * Append an element to the TypeAccess list. 336 * @param node The element to append to the TypeAccess list. 337 * @apilevel high-level 338 * @ast method 339 * 340 */ 341 public void addTypeAccess(Access node) { 342 List<Access> list = (parent == null || state == null) ? getTypeAccessListNoTransform() : getTypeAccessList(); 343 list.addChild(node); 344 } 345 /** 346 * @apilevel low-level 347 * @ast method 348 * 349 */ 350 public void addTypeAccessNoTransform(Access node) { 351 List<Access> list = getTypeAccessListNoTransform(); 352 list.addChild(node); 353 } 354 /** 355 * Replaces the TypeAccess list element at index {@code i} with the new node {@code node}. 356 * @param node The new node to replace the old list element. 357 * @param i The list index of the node to be replaced. 358 * @apilevel high-level 359 * @ast method 360 * 361 */ 362 public void setTypeAccess(Access node, int i) { 363 List<Access> list = getTypeAccessList(); 364 list.setChild(node, i); 365 } 366 /** 367 * Retrieves the TypeAccess list. 368 * @return The node representing the TypeAccess list. 369 * @apilevel high-level 370 * @ast method 371 * 372 */ 373 public List<Access> getTypeAccesss() { 374 return getTypeAccessList(); 375 } 376 /** 377 * Retrieves the TypeAccess list. 378 * <p><em>This method does not invoke AST transformations.</em></p> 379 * @return The node representing the TypeAccess list. 380 * @apilevel low-level 381 * @ast method 382 * 383 */ 384 public List<Access> getTypeAccesssNoTransform() { 385 return getTypeAccessListNoTransform(); 386 } 387 /** 388 * Retrieves the TypeAccess list. 389 * @return The node representing the TypeAccess list. 390 * @apilevel high-level 391 * @ast method 392 * 393 */ 394 @SuppressWarnings({"unchecked", "cast"}) 395 public List<Access> getTypeAccessList() { 396 List<Access> list = (List<Access>)getChild(1); 397 list.getNumChild(); 398 return list; 399 } 400 /** 401 * Retrieves the TypeAccess list. 402 * <p><em>This method does not invoke AST transformations.</em></p> 403 * @return The node representing the TypeAccess list. 404 * @apilevel low-level 405 * @ast method 406 * 407 */ 408 @SuppressWarnings({"unchecked", "cast"}) 409 public List<Access> getTypeAccessListNoTransform() { 410 return (List<Access>)getChildNoTransform(1); 411 } 412 /** 413 * Replaces the lexeme ID. 414 * @param value The new value for the lexeme ID. 415 * @apilevel high-level 416 * @ast method 417 * 418 */ 419 public void setID(String value) { 420 tokenString_ID = value; 421 } 422 /** 423 * @apilevel internal 424 * @ast method 425 * 426 */ 427 428 /** 429 * @apilevel internal 430 */ 431 protected String tokenString_ID; 432 /** 433 * @ast method 434 * 435 */ 436 437 public int IDstart; 438 /** 439 * @ast method 440 * 441 */ 442 443 public int IDend; 444 /** 445 * JastAdd-internal setter for lexeme ID using the Beaver parser. 446 * @apilevel internal 447 * @ast method 448 * 449 */ 450 public void setID(beaver.Symbol symbol) { 451 if(symbol.value != null && !(symbol.value instanceof String)) 452 throw new UnsupportedOperationException("setID is only valid for String lexemes"); 453 tokenString_ID = (String)symbol.value; 454 IDstart = symbol.getStart(); 455 IDend = symbol.getEnd(); 456 } 457 /** 458 * Retrieves the value for the lexeme ID. 459 * @return The value for the lexeme ID. 460 * @apilevel high-level 461 * @ast method 462 * 463 */ 464 public String getID() { 465 return tokenString_ID != null ? tokenString_ID : ""; 466 } 467 /** 468 * @attribute syn 469 * @aspect MultiCatch 470 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:17 471 */ 472 public boolean isParameter() { 473 ASTNode$State state = state(); 474 try { return true; } 475 finally { 476 } 477 } 478 /** 479 * @attribute syn 480 * @aspect MultiCatch 481 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:20 482 */ 483 public boolean isClassVariable() { 484 ASTNode$State state = state(); 485 try { return false; } 486 finally { 487 } 488 } 489 /** 490 * @attribute syn 491 * @aspect MultiCatch 492 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:21 493 */ 494 public boolean isInstanceVariable() { 495 ASTNode$State state = state(); 496 try { return false; } 497 finally { 498 } 499 } 500 /** 501 * @attribute syn 502 * @aspect MultiCatch 503 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:25 504 */ 505 public boolean isLocalVariable() { 506 ASTNode$State state = state(); 507 try { return false; } 508 finally { 509 } 510 } 511 /** 512 * The catch parameter of a multi-catch clause is implicitly final. 513 * @attribute syn 514 * @aspect MultiCatch 515 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:34 516 */ 517 public boolean isFinal() { 518 ASTNode$State state = state(); 519 try { return true; } 520 finally { 521 } 522 } 523 /** 524 * @attribute syn 525 * @aspect MultiCatch 526 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:35 527 */ 528 public boolean isVolatile() { 529 ASTNode$State state = state(); 530 try { return getModifiers().isVolatile(); } 531 finally { 532 } 533 } 534 /** 535 * @attribute syn 536 * @aspect MultiCatch 537 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:36 538 */ 539 public boolean isBlank() { 540 ASTNode$State state = state(); 541 try { return false; } 542 finally { 543 } 544 } 545 /** 546 * @attribute syn 547 * @aspect MultiCatch 548 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:37 549 */ 550 public boolean isStatic() { 551 ASTNode$State state = state(); 552 try { return false; } 553 finally { 554 } 555 } 556 /** 557 * @attribute syn 558 * @aspect MultiCatch 559 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:39 560 */ 561 public String name() { 562 ASTNode$State state = state(); 563 try { return getID(); } 564 finally { 565 } 566 } 567 /** 568 * @attribute syn 569 * @aspect MultiCatch 570 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:41 571 */ 572 public boolean hasInit() { 573 ASTNode$State state = state(); 574 try { return false; } 575 finally { 576 } 577 } 578 /** 579 * @attribute syn 580 * @aspect MultiCatch 581 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:42 582 */ 583 public Expr getInit() { 584 ASTNode$State state = state(); 585 try { 586 throw new UnsupportedOperationException(); 587 } 588 finally { 589 } 590 } 591 /** 592 * @attribute syn 593 * @aspect MultiCatch 594 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:45 595 */ 596 public Constant constant() { 597 ASTNode$State state = state(); 598 try { 599 throw new UnsupportedOperationException(); 600 } 601 finally { 602 } 603 } 604 /** 605 * @attribute syn 606 * @aspect MultiCatch 607 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:50 608 */ 609 public boolean isSynthetic() { 610 ASTNode$State state = state(); 611 try { return getModifiers().isSynthetic(); } 612 finally { 613 } 614 } 615 /** 616 * @apilevel internal 617 */ 618 protected boolean sourceVariableDecl_computed = false; 619 /** 620 * @apilevel internal 621 */ 622 protected Variable sourceVariableDecl_value; 623 /** 624 * @see "Generics.jrag" 625 * @attribute syn 626 * @aspect MultiCatch 627 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:55 628 */ 629 @SuppressWarnings({"unchecked", "cast"}) 630 public Variable sourceVariableDecl() { 631 if(sourceVariableDecl_computed) { 632 return sourceVariableDecl_value; 633 } 634 ASTNode$State state = state(); 635 int num = state.boundariesCrossed; 636 boolean isFinal = this.is$Final(); 637 sourceVariableDecl_value = sourceVariableDecl_compute(); 638 if(isFinal && num == state().boundariesCrossed){ sourceVariableDecl_computed = true; } 639 return sourceVariableDecl_value; 640 } 641 /** 642 * @apilevel internal 643 */ 644 private Variable sourceVariableDecl_compute() { return this; } 645 /** 646 * @attribute syn 647 * @aspect MultiCatch 648 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:61 649 */ 650 public int size() { 651 ASTNode$State state = state(); 652 try { return 1; } 653 finally { 654 } 655 } 656 /** 657 * @attribute syn 658 * @aspect MultiCatch 659 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:62 660 */ 661 public boolean isEmpty() { 662 ASTNode$State state = state(); 663 try { return false; } 664 finally { 665 } 666 } 667 /** 668 * @attribute syn 669 * @aspect MultiCatch 670 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:66 671 */ 672 public boolean contains(Object o) { 673 ASTNode$State state = state(); 674 try { return this == o; } 675 finally { 676 } 677 } 678 /** 679 * A catch parameter declared with a disjunction type has the 680 * effective type lub(t1, t2, ...) 681 * 682 * @see "JLSv3 §15.12.2.7" 683 * @attribute syn 684 * @aspect MultiCatch 685 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:173 686 */ 687 public TypeDecl type() { 688 ASTNode$State state = state(); 689 try { 690 ArrayList<TypeDecl> list = new ArrayList<TypeDecl>(); 691 for (int i = 0; i < getNumTypeAccess(); i++) 692 list.add(getTypeAccess(i).type()); 693 return lookupLUBType(list).lub(); 694 } 695 finally { 696 } 697 } 698 /** 699 * @apilevel internal 700 */ 701 protected boolean throwTypes_computed = false; 702 /** 703 * @apilevel internal 704 */ 705 protected Collection<TypeDecl> throwTypes_value; 706 /** 707 * @attribute syn 708 * @aspect PreciseRethrow 709 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/PreciseRethrow.jrag:38 710 */ 711 @SuppressWarnings({"unchecked", "cast"}) 712 public Collection<TypeDecl> throwTypes() { 713 if(throwTypes_computed) { 714 return throwTypes_value; 715 } 716 ASTNode$State state = state(); 717 int num = state.boundariesCrossed; 718 boolean isFinal = this.is$Final(); 719 throwTypes_value = throwTypes_compute(); 720 if(isFinal && num == state().boundariesCrossed){ throwTypes_computed = true; } 721 return throwTypes_value; 722 } 723 /** 724 * @apilevel internal 725 */ 726 private Collection<TypeDecl> throwTypes_compute() { return catchClause().caughtExceptions(); } 727 /** 728 * Inherit the lookupVariable attribute. 729 * @attribute inh 730 * @aspect MultiCatch 731 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:14 732 */ 733 @SuppressWarnings({"unchecked", "cast"}) 734 public SimpleSet lookupVariable(String name) { 735 ASTNode$State state = state(); 736 SimpleSet lookupVariable_String_value = getParent().Define_SimpleSet_lookupVariable(this, null, name); 737 return lookupVariable_String_value; 738 } 739 /** 740 * @attribute inh 741 * @aspect MultiCatch 742 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:22 743 */ 744 @SuppressWarnings({"unchecked", "cast"}) 745 public boolean isMethodParameter() { 746 ASTNode$State state = state(); 747 boolean isMethodParameter_value = getParent().Define_boolean_isMethodParameter(this, null); 748 return isMethodParameter_value; 749 } 750 /** 751 * @attribute inh 752 * @aspect MultiCatch 753 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:23 754 */ 755 @SuppressWarnings({"unchecked", "cast"}) 756 public boolean isConstructorParameter() { 757 ASTNode$State state = state(); 758 boolean isConstructorParameter_value = getParent().Define_boolean_isConstructorParameter(this, null); 759 return isConstructorParameter_value; 760 } 761 /** 762 * @attribute inh 763 * @aspect MultiCatch 764 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:24 765 */ 766 @SuppressWarnings({"unchecked", "cast"}) 767 public boolean isExceptionHandlerParameter() { 768 ASTNode$State state = state(); 769 boolean isExceptionHandlerParameter_value = getParent().Define_boolean_isExceptionHandlerParameter(this, null); 770 return isExceptionHandlerParameter_value; 771 } 772 /** 773 * @attribute inh 774 * @aspect MultiCatch 775 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:49 776 */ 777 @SuppressWarnings({"unchecked", "cast"}) 778 public TypeDecl hostType() { 779 ASTNode$State state = state(); 780 TypeDecl hostType_value = getParent().Define_TypeDecl_hostType(this, null); 781 return hostType_value; 782 } 783 /** 784 * @attribute inh 785 * @aspect MultiCatch 786 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:165 787 */ 788 @SuppressWarnings({"unchecked", "cast"}) 789 public LUBType lookupLUBType(Collection bounds) { 790 ASTNode$State state = state(); 791 LUBType lookupLUBType_Collection_value = getParent().Define_LUBType_lookupLUBType(this, null, bounds); 792 return lookupLUBType_Collection_value; 793 } 794 /** 795 * @attribute inh 796 * @aspect MultiCatch 797 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:180 798 */ 799 @SuppressWarnings({"unchecked", "cast"}) 800 public VariableScope outerScope() { 801 ASTNode$State state = state(); 802 VariableScope outerScope_value = getParent().Define_VariableScope_outerScope(this, null); 803 return outerScope_value; 804 } 805 /** 806 * @attribute inh 807 * @aspect MultiCatch 808 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:181 809 */ 810 @SuppressWarnings({"unchecked", "cast"}) 811 public BodyDecl enclosingBodyDecl() { 812 ASTNode$State state = state(); 813 BodyDecl enclosingBodyDecl_value = getParent().Define_BodyDecl_enclosingBodyDecl(this, null); 814 return enclosingBodyDecl_value; 815 } 816 /** 817 * @attribute inh 818 * @aspect PreciseRethrow 819 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/PreciseRethrow.jrag:128 820 */ 821 @SuppressWarnings({"unchecked", "cast"}) 822 public CatchClause catchClause() { 823 ASTNode$State state = state(); 824 CatchClause catchClause_value = getParent().Define_CatchClause_catchClause(this, null); 825 return catchClause_value; 826 } 827 /** 828 * @apilevel internal 829 */ 830 protected boolean localNum_computed = false; 831 /** 832 * @apilevel internal 833 */ 834 protected int localNum_value; 835 /** 836 * Local number used to store the exception parameter. 837 * @attribute inh 838 * @aspect MultiCatch 839 * @declaredat /home/jesper/svn/JastAddJ/Java7Backend/MultiCatch.jrag:42 840 */ 841 @SuppressWarnings({"unchecked", "cast"}) 842 public int localNum() { 843 if(localNum_computed) { 844 return localNum_value; 845 } 846 ASTNode$State state = state(); 847 int num = state.boundariesCrossed; 848 boolean isFinal = this.is$Final(); 849 localNum_value = getParent().Define_int_localNum(this, null); 850 if(isFinal && num == state().boundariesCrossed){ localNum_computed = true; } 851 return localNum_value; 852 } 853 /** 854 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/MultiCatch.jrag:92 855 * @apilevel internal 856 */ 857 public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { 858 if(caller == getTypeAccessListNoTransform()) { 859 int i = caller.getIndexOfChild(child); 860 return NameType.TYPE_NAME; 861 } 862 else { return getParent().Define_NameType_nameType(this, caller); 863 } 864 } 865 /** 866 * @apilevel internal 867 */ 868 public ASTNode rewriteTo() { 869 return super.rewriteTo(); 870 } 871 }