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 RawClassDecl : {@link ParClassDecl} ::= <span class="component">Argument:{@link Access}*</span>; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.ast:7 017 */ 018 public class RawClassDecl extends ParClassDecl implements Cloneable { 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 RawClassDecl clone() throws CloneNotSupportedException { 034 RawClassDecl node = (RawClassDecl)super.clone(); 035 node.getArgumentList_computed = false; 036 node.getArgumentList_value = null; 037 node.subtype_TypeDecl_values = null; 038 node.instanceOf_TypeDecl_values = null; 039 node.in$Circle(false); 040 node.is$Final(false); 041 return node; 042 } 043 /** 044 * @apilevel internal 045 */ 046 @SuppressWarnings({"unchecked", "cast"}) 047 public RawClassDecl copy() { 048 049 try { 050 RawClassDecl node = (RawClassDecl) clone(); 051 node.parent = null; 052 if(children != null) 053 node.children = (ASTNode[]) children.clone(); 054 055 return node; 056 } catch (CloneNotSupportedException e) { 057 throw new Error("Error: clone not supported for " + getClass().getName()); 058 } 059 060 }/** 061 * Create a deep copy of the AST subtree at this node. 062 * The copy is dangling, i.e. has no parent. 063 * @return dangling copy of the subtree at this node 064 * @apilevel low-level 065 */ 066 @SuppressWarnings({"unchecked", "cast"}) 067 public RawClassDecl fullCopy() { 068 069 RawClassDecl tree = (RawClassDecl) copy(); 070 if (children != null) { 071 for (int i = 0; i < children.length; ++i) { 072 switch (i) { 073 case 2: 074 tree.children[i] = new Opt(); 075 continue; 076 case 3: 077 case 4: 078 case 5: 079 tree.children[i] = new List(); 080 continue; 081 } 082 ASTNode child = (ASTNode) children[i]; 083 if(child != null) { 084 child = child.fullCopy(); 085 tree.setChild(child, i); 086 } 087 } 088 } 089 return tree; 090 091 } /** 092 * @ast method 093 * @aspect LookupParTypeDecl 094 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:899 095 */ 096 public Access substitute(Parameterization parTypeDecl) { return createBoundAccess(); } 097 /** 098 * @ast method 099 * @aspect LookupParTypeDecl 100 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:954 101 */ 102 public Access substituteReturnType(Parameterization parTypeDecl) { return createBoundAccess(); } 103 /** 104 * @ast method 105 * @aspect LookupParTypeDecl 106 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:974 107 */ 108 public Access substituteParameterType(Parameterization parTypeDecl) { return createBoundAccess(); } 109 /** 110 * @ast method 111 * 112 */ 113 public RawClassDecl() { 114 super(); 115 116 117 } 118 /** 119 * Initializes the child array to the correct size. 120 * Initializes List and Opt nta children. 121 * @apilevel internal 122 * @ast method 123 * @ast method 124 * 125 */ 126 public void init$Children() { 127 children = new ASTNode[5]; 128 setChild(new Opt(), 1); 129 setChild(new List(), 2); 130 setChild(new List(), 3); 131 setChild(new List(), 4); 132 } 133 /** 134 * @ast method 135 * 136 */ 137 public RawClassDecl(Modifiers p0, String p1) { 138 setChild(p0, 0); 139 setID(p1); 140 } 141 /** 142 * @ast method 143 * 144 */ 145 public RawClassDecl(Modifiers p0, beaver.Symbol p1) { 146 setChild(p0, 0); 147 setID(p1); 148 } 149 /** 150 * @apilevel low-level 151 * @ast method 152 * 153 */ 154 protected int numChildren() { 155 return 1; 156 } 157 /** 158 * @apilevel internal 159 * @ast method 160 * 161 */ 162 public boolean mayHaveRewrite() { 163 return false; 164 } 165 /** 166 * Replaces the Modifiers child. 167 * @param node The new node to replace the Modifiers child. 168 * @apilevel high-level 169 * @ast method 170 * 171 */ 172 public void setModifiers(Modifiers node) { 173 setChild(node, 0); 174 } 175 /** 176 * Retrieves the Modifiers child. 177 * @return The current node used as the Modifiers child. 178 * @apilevel high-level 179 * @ast method 180 * 181 */ 182 public Modifiers getModifiers() { 183 return (Modifiers)getChild(0); 184 } 185 /** 186 * Retrieves the Modifiers child. 187 * <p><em>This method does not invoke AST transformations.</em></p> 188 * @return The current node used as the Modifiers child. 189 * @apilevel low-level 190 * @ast method 191 * 192 */ 193 public Modifiers getModifiersNoTransform() { 194 return (Modifiers)getChildNoTransform(0); 195 } 196 /** 197 * Replaces the lexeme ID. 198 * @param value The new value for the lexeme ID. 199 * @apilevel high-level 200 * @ast method 201 * 202 */ 203 public void setID(String value) { 204 tokenString_ID = value; 205 } 206 /** 207 * JastAdd-internal setter for lexeme ID using the Beaver parser. 208 * @apilevel internal 209 * @ast method 210 * 211 */ 212 public void setID(beaver.Symbol symbol) { 213 if(symbol.value != null && !(symbol.value instanceof String)) 214 throw new UnsupportedOperationException("setID is only valid for String lexemes"); 215 tokenString_ID = (String)symbol.value; 216 IDstart = symbol.getStart(); 217 IDend = symbol.getEnd(); 218 } 219 /** 220 * Retrieves the value for the lexeme ID. 221 * @return The value for the lexeme ID. 222 * @apilevel high-level 223 * @ast method 224 * 225 */ 226 public String getID() { 227 return tokenString_ID != null ? tokenString_ID : ""; 228 } 229 /** 230 * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! 231 * @param opt The new node to be used as the optional node for the SuperClassAccess child. 232 * @apilevel low-level 233 * @ast method 234 * 235 */ 236 public void setSuperClassAccessOpt(Opt<Access> opt) { 237 setChild(opt, 1); 238 } 239 /** 240 * Check whether the optional SuperClassAccess child exists. 241 * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. 242 * @apilevel high-level 243 * @ast method 244 * 245 */ 246 public boolean hasSuperClassAccess() { 247 return getSuperClassAccessOpt().getNumChild() != 0; 248 } 249 /** 250 * Retrieves the (optional) SuperClassAccess child. 251 * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. 252 * @apilevel low-level 253 * @ast method 254 * 255 */ 256 @SuppressWarnings({"unchecked", "cast"}) 257 public Access getSuperClassAccess() { 258 return (Access)getSuperClassAccessOpt().getChild(0); 259 } 260 /** 261 * Replaces the (optional) SuperClassAccess child. 262 * @param node The new node to be used as the SuperClassAccess child. 263 * @apilevel high-level 264 * @ast method 265 * 266 */ 267 public void setSuperClassAccess(Access node) { 268 getSuperClassAccessOpt().setChild(node, 0); 269 } 270 /** 271 * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! 272 * <p><em>This method does not invoke AST transformations.</em></p> 273 * @return The optional node for child SuperClassAccess. 274 * @apilevel low-level 275 * @ast method 276 * 277 */ 278 @SuppressWarnings({"unchecked", "cast"}) 279 public Opt<Access> getSuperClassAccessOptNoTransform() { 280 return (Opt<Access>)getChildNoTransform(1); 281 } 282 /** 283 * Retrieves the child position of the optional child SuperClassAccess. 284 * @return The the child position of the optional child SuperClassAccess. 285 * @apilevel low-level 286 * @ast method 287 * 288 */ 289 protected int getSuperClassAccessOptChildPosition() { 290 return 1; 291 } 292 /** 293 * Replaces the Implements list. 294 * @param list The new list node to be used as the Implements list. 295 * @apilevel high-level 296 * @ast method 297 * 298 */ 299 public void setImplementsList(List<Access> list) { 300 setChild(list, 2); 301 } 302 /** 303 * Retrieves the number of children in the Implements list. 304 * @return Number of children in the Implements list. 305 * @apilevel high-level 306 * @ast method 307 * 308 */ 309 public int getNumImplements() { 310 return getImplementsList().getNumChild(); 311 } 312 /** 313 * Retrieves the number of children in the Implements list. 314 * Calling this method will not trigger rewrites.. 315 * @return Number of children in the Implements list. 316 * @apilevel low-level 317 * @ast method 318 * 319 */ 320 public int getNumImplementsNoTransform() { 321 return getImplementsListNoTransform().getNumChildNoTransform(); 322 } 323 /** 324 * Retrieves the element at index {@code i} in the Implements list.. 325 * @param i Index of the element to return. 326 * @return The element at position {@code i} in the Implements list. 327 * @apilevel high-level 328 * @ast method 329 * 330 */ 331 @SuppressWarnings({"unchecked", "cast"}) 332 public Access getImplements(int i) { 333 return (Access)getImplementsList().getChild(i); 334 } 335 /** 336 * Append an element to the Implements list. 337 * @param node The element to append to the Implements list. 338 * @apilevel high-level 339 * @ast method 340 * 341 */ 342 public void addImplements(Access node) { 343 List<Access> list = (parent == null || state == null) ? getImplementsListNoTransform() : getImplementsList(); 344 list.addChild(node); 345 } 346 /** 347 * @apilevel low-level 348 * @ast method 349 * 350 */ 351 public void addImplementsNoTransform(Access node) { 352 List<Access> list = getImplementsListNoTransform(); 353 list.addChild(node); 354 } 355 /** 356 * Replaces the Implements list element at index {@code i} with the new node {@code node}. 357 * @param node The new node to replace the old list element. 358 * @param i The list index of the node to be replaced. 359 * @apilevel high-level 360 * @ast method 361 * 362 */ 363 public void setImplements(Access node, int i) { 364 List<Access> list = getImplementsList(); 365 list.setChild(node, i); 366 } 367 /** 368 * Retrieves the Implements list. 369 * @return The node representing the Implements list. 370 * @apilevel high-level 371 * @ast method 372 * 373 */ 374 public List<Access> getImplementss() { 375 return getImplementsList(); 376 } 377 /** 378 * Retrieves the Implements list. 379 * <p><em>This method does not invoke AST transformations.</em></p> 380 * @return The node representing the Implements list. 381 * @apilevel low-level 382 * @ast method 383 * 384 */ 385 public List<Access> getImplementssNoTransform() { 386 return getImplementsListNoTransform(); 387 } 388 /** 389 * Retrieves the Implements list. 390 * <p><em>This method does not invoke AST transformations.</em></p> 391 * @return The node representing the Implements list. 392 * @apilevel low-level 393 * @ast method 394 * 395 */ 396 public List<Access> getImplementsListNoTransform() { 397 return (List<Access>)getChildNoTransform(2); 398 } 399 /** 400 * Retrieves the child position of the Implements list. 401 * @return The the child position of the Implements list. 402 * @apilevel low-level 403 * @ast method 404 * 405 */ 406 protected int getImplementsListChildPosition() { 407 return 2; 408 } 409 /** 410 * Replaces the BodyDecl list. 411 * @param list The new list node to be used as the BodyDecl list. 412 * @apilevel high-level 413 * @ast method 414 * 415 */ 416 public void setBodyDeclList(List<BodyDecl> list) { 417 setChild(list, 3); 418 } 419 /** 420 * Retrieves the number of children in the BodyDecl list. 421 * @return Number of children in the BodyDecl list. 422 * @apilevel high-level 423 * @ast method 424 * 425 */ 426 public int getNumBodyDecl() { 427 return getBodyDeclList().getNumChild(); 428 } 429 /** 430 * Retrieves the number of children in the BodyDecl list. 431 * Calling this method will not trigger rewrites.. 432 * @return Number of children in the BodyDecl list. 433 * @apilevel low-level 434 * @ast method 435 * 436 */ 437 public int getNumBodyDeclNoTransform() { 438 return getBodyDeclListNoTransform().getNumChildNoTransform(); 439 } 440 /** 441 * Retrieves the element at index {@code i} in the BodyDecl list.. 442 * @param i Index of the element to return. 443 * @return The element at position {@code i} in the BodyDecl list. 444 * @apilevel high-level 445 * @ast method 446 * 447 */ 448 @SuppressWarnings({"unchecked", "cast"}) 449 public BodyDecl getBodyDecl(int i) { 450 return (BodyDecl)getBodyDeclList().getChild(i); 451 } 452 /** 453 * Append an element to the BodyDecl list. 454 * @param node The element to append to the BodyDecl list. 455 * @apilevel high-level 456 * @ast method 457 * 458 */ 459 public void addBodyDecl(BodyDecl node) { 460 List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); 461 list.addChild(node); 462 } 463 /** 464 * @apilevel low-level 465 * @ast method 466 * 467 */ 468 public void addBodyDeclNoTransform(BodyDecl node) { 469 List<BodyDecl> list = getBodyDeclListNoTransform(); 470 list.addChild(node); 471 } 472 /** 473 * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. 474 * @param node The new node to replace the old list element. 475 * @param i The list index of the node to be replaced. 476 * @apilevel high-level 477 * @ast method 478 * 479 */ 480 public void setBodyDecl(BodyDecl node, int i) { 481 List<BodyDecl> list = getBodyDeclList(); 482 list.setChild(node, i); 483 } 484 /** 485 * Retrieves the BodyDecl list. 486 * @return The node representing the BodyDecl list. 487 * @apilevel high-level 488 * @ast method 489 * 490 */ 491 public List<BodyDecl> getBodyDecls() { 492 return getBodyDeclList(); 493 } 494 /** 495 * Retrieves the BodyDecl list. 496 * <p><em>This method does not invoke AST transformations.</em></p> 497 * @return The node representing the BodyDecl list. 498 * @apilevel low-level 499 * @ast method 500 * 501 */ 502 public List<BodyDecl> getBodyDeclsNoTransform() { 503 return getBodyDeclListNoTransform(); 504 } 505 /** 506 * Retrieves the BodyDecl list. 507 * <p><em>This method does not invoke AST transformations.</em></p> 508 * @return The node representing the BodyDecl list. 509 * @apilevel low-level 510 * @ast method 511 * 512 */ 513 public List<BodyDecl> getBodyDeclListNoTransform() { 514 return (List<BodyDecl>)getChildNoTransform(3); 515 } 516 /** 517 * Retrieves the child position of the BodyDecl list. 518 * @return The the child position of the BodyDecl list. 519 * @apilevel low-level 520 * @ast method 521 * 522 */ 523 protected int getBodyDeclListChildPosition() { 524 return 3; 525 } 526 /** 527 * Replaces the Argument list. 528 * @param list The new list node to be used as the Argument list. 529 * @apilevel high-level 530 * @ast method 531 * 532 */ 533 public void setArgumentList(List<Access> list) { 534 setChild(list, 4); 535 } 536 /** 537 * Retrieves the number of children in the Argument list. 538 * @return Number of children in the Argument list. 539 * @apilevel high-level 540 * @ast method 541 * 542 */ 543 public int getNumArgument() { 544 return getArgumentList().getNumChild(); 545 } 546 /** 547 * Retrieves the number of children in the Argument list. 548 * Calling this method will not trigger rewrites.. 549 * @return Number of children in the Argument list. 550 * @apilevel low-level 551 * @ast method 552 * 553 */ 554 public int getNumArgumentNoTransform() { 555 return getArgumentListNoTransform().getNumChildNoTransform(); 556 } 557 /** 558 * Retrieves the element at index {@code i} in the Argument list.. 559 * @param i Index of the element to return. 560 * @return The element at position {@code i} in the Argument list. 561 * @apilevel high-level 562 * @ast method 563 * 564 */ 565 @SuppressWarnings({"unchecked", "cast"}) 566 public Access getArgument(int i) { 567 return (Access)getArgumentList().getChild(i); 568 } 569 /** 570 * Append an element to the Argument list. 571 * @param node The element to append to the Argument list. 572 * @apilevel high-level 573 * @ast method 574 * 575 */ 576 public void addArgument(Access node) { 577 List<Access> list = (parent == null || state == null) ? getArgumentListNoTransform() : getArgumentList(); 578 list.addChild(node); 579 } 580 /** 581 * @apilevel low-level 582 * @ast method 583 * 584 */ 585 public void addArgumentNoTransform(Access node) { 586 List<Access> list = getArgumentListNoTransform(); 587 list.addChild(node); 588 } 589 /** 590 * Replaces the Argument list element at index {@code i} with the new node {@code node}. 591 * @param node The new node to replace the old list element. 592 * @param i The list index of the node to be replaced. 593 * @apilevel high-level 594 * @ast method 595 * 596 */ 597 public void setArgument(Access node, int i) { 598 List<Access> list = getArgumentList(); 599 list.setChild(node, i); 600 } 601 /** 602 * Retrieves the Argument list. 603 * @return The node representing the Argument list. 604 * @apilevel high-level 605 * @ast method 606 * 607 */ 608 public List<Access> getArguments() { 609 return getArgumentList(); 610 } 611 /** 612 * Retrieves the Argument list. 613 * <p><em>This method does not invoke AST transformations.</em></p> 614 * @return The node representing the Argument list. 615 * @apilevel low-level 616 * @ast method 617 * 618 */ 619 public List<Access> getArgumentsNoTransform() { 620 return getArgumentListNoTransform(); 621 } 622 /** 623 * Retrieves the Argument list. 624 * <p><em>This method does not invoke AST transformations.</em></p> 625 * @return The node representing the Argument list. 626 * @apilevel low-level 627 * @ast method 628 * 629 */ 630 public List<Access> getArgumentListNoTransform() { 631 return (List<Access>)getChildNoTransform(4); 632 } 633 /** 634 * Retrieves the child position of the Argument list. 635 * @return The the child position of the Argument list. 636 * @apilevel low-level 637 * @ast method 638 * 639 */ 640 protected int getArgumentListChildPosition() { 641 return 4; 642 } 643 /** 644 * @attribute syn 645 * @aspect NestedTypes 646 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:569 647 */ 648 public TypeDecl hostType() { 649 ASTNode$State state = state(); 650 try { return original(); } 651 finally { 652 } 653 } 654 /** 655 * @attribute syn 656 * @aspect Generics 657 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:245 658 */ 659 public boolean isRawType() { 660 ASTNode$State state = state(); 661 try { return true; } 662 finally { 663 } 664 } 665 /** 666 * @attribute syn 667 * @aspect LookupParTypeDecl 668 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:577 669 */ 670 public boolean sameSignature(Access a) { 671 ASTNode$State state = state(); 672 try { return a instanceof TypeAccess && a.type() == this; } 673 finally { 674 } 675 } 676 /** 677 * @apilevel internal 678 */ 679 protected boolean getArgumentList_computed = false; 680 /** 681 * @apilevel internal 682 */ 683 protected List getArgumentList_value; 684 /** 685 * @attribute syn nta 686 * @aspect LookupParTypeDecl 687 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:755 688 */ 689 @SuppressWarnings({"unchecked", "cast"}) 690 public List getArgumentList() { 691 if(getArgumentList_computed) { 692 return (List) getChild(getArgumentListChildPosition()); 693 } 694 ASTNode$State state = state(); 695 int num = state.boundariesCrossed; 696 boolean isFinal = this.is$Final(); 697 getArgumentList_value = getArgumentList_compute(); 698 setArgumentList(getArgumentList_value); 699 if(true){ getArgumentList_computed = true; } 700 List node = (List) this.getChild(getArgumentListChildPosition()); 701 return node; 702 } 703 /** 704 * @apilevel internal 705 */ 706 private List getArgumentList_compute() { return ((GenericClassDecl)genericDecl()).createArgumentList(new ArrayList()); } 707 /** 708 * @attribute syn 709 * @aspect GenericsParTypeDecl 710 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:30 711 */ 712 public String nameWithArgs() { 713 ASTNode$State state = state(); 714 try { return name(); } 715 finally { 716 } 717 } 718 /** 719 * @attribute syn 720 * @aspect GenericsSubtype 721 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:14 722 */ 723 public boolean supertypeGenericClassDecl(GenericClassDecl type) { 724 ASTNode$State state = state(); 725 try { return type.subtype(genericDecl().original()); } 726 finally { 727 } 728 } 729 protected java.util.Map subtype_TypeDecl_values; 730 /** 731 * @attribute syn 732 * @aspect GenericsSubtype 733 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:25 734 */ 735 @SuppressWarnings({"unchecked", "cast"}) 736 public boolean subtype(TypeDecl type) { 737 Object _parameters = type; 738 if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); 739 ASTNode$State.CircularValue _value; 740 if(subtype_TypeDecl_values.containsKey(_parameters)) { 741 Object _o = subtype_TypeDecl_values.get(_parameters); 742 if(!(_o instanceof ASTNode$State.CircularValue)) { 743 return ((Boolean)_o).booleanValue(); 744 } 745 else 746 _value = (ASTNode$State.CircularValue)_o; 747 } 748 else { 749 _value = new ASTNode$State.CircularValue(); 750 subtype_TypeDecl_values.put(_parameters, _value); 751 _value.value = Boolean.valueOf(true); 752 } 753 ASTNode$State state = state(); 754 if (!state.IN_CIRCLE) { 755 state.IN_CIRCLE = true; 756 int num = state.boundariesCrossed; 757 boolean isFinal = this.is$Final(); 758 boolean new_subtype_TypeDecl_value; 759 do { 760 _value.visited = new Integer(state.CIRCLE_INDEX); 761 state.CHANGE = false; 762 new_subtype_TypeDecl_value = subtype_compute(type); 763 if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { 764 state.CHANGE = true; 765 _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); 766 } 767 state.CIRCLE_INDEX++; 768 } while (state.CHANGE); 769 if(isFinal && num == state().boundariesCrossed) { 770 subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); 771 } 772 else { 773 subtype_TypeDecl_values.remove(_parameters); 774 state.RESET_CYCLE = true; 775 subtype_compute(type); 776 state.RESET_CYCLE = false; 777 } 778 state.IN_CIRCLE = false; 779 return new_subtype_TypeDecl_value; 780 } 781 if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { 782 _value.visited = new Integer(state.CIRCLE_INDEX); 783 boolean new_subtype_TypeDecl_value = subtype_compute(type); 784 if (state.RESET_CYCLE) { 785 subtype_TypeDecl_values.remove(_parameters); 786 } 787 else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { 788 state.CHANGE = true; 789 _value.value = new_subtype_TypeDecl_value; 790 } 791 return new_subtype_TypeDecl_value; 792 } 793 return ((Boolean)_value.value).booleanValue(); 794 } 795 /** 796 * @apilevel internal 797 */ 798 private boolean subtype_compute(TypeDecl type) { return type.supertypeRawClassDecl(this); } 799 /** 800 * @attribute syn 801 * @aspect GenericsSubtype 802 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:421 803 */ 804 public boolean supertypeClassDecl(ClassDecl type) { 805 ASTNode$State state = state(); 806 try { return type.subtype(genericDecl().original()); } 807 finally { 808 } 809 } 810 /** 811 * @attribute syn 812 * @aspect GenericsSubtype 813 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:437 814 */ 815 public boolean supertypeInterfaceDecl(InterfaceDecl type) { 816 ASTNode$State state = state(); 817 try { return type.subtype(genericDecl().original()); } 818 finally { 819 } 820 } 821 /** 822 * @attribute syn 823 * @aspect GenericsSubtype 824 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:125 825 */ 826 public boolean supertypeParClassDecl(ParClassDecl type) { 827 ASTNode$State state = state(); 828 try { return type.genericDecl().original().subtype(genericDecl().original()); } 829 finally { 830 } 831 } 832 protected java.util.Map instanceOf_TypeDecl_values; 833 /** 834 * @attribute syn 835 * @aspect GenericsSubtype 836 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:397 837 */ 838 @SuppressWarnings({"unchecked", "cast"}) 839 public boolean instanceOf(TypeDecl type) { 840 Object _parameters = type; 841 if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); 842 if(instanceOf_TypeDecl_values.containsKey(_parameters)) { 843 return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); 844 } 845 ASTNode$State state = state(); 846 int num = state.boundariesCrossed; 847 boolean isFinal = this.is$Final(); 848 boolean instanceOf_TypeDecl_value = instanceOf_compute(type); 849 if(isFinal && num == state().boundariesCrossed){ instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); } 850 return instanceOf_TypeDecl_value; 851 } 852 /** 853 * @apilevel internal 854 */ 855 private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } 856 /** 857 * @attribute syn 858 * @aspect GenericsCodegen 859 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Backend/GenericsCodegen.jrag:470 860 */ 861 public String typeArgumentsOpt() { 862 ASTNode$State state = state(); 863 try { return ""; } 864 finally { 865 } 866 } 867 /** 868 * @apilevel internal 869 */ 870 public ASTNode rewriteTo() { 871 return super.rewriteTo(); 872 } 873 }