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 ClassInstanceExpr : {@link Access} ::= <span class="component">{@link Access}</span> <span class="component">Arg:{@link Expr}*</span> <span class="component">[{@link TypeDecl}]</span>; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:37 017 */ 018 public class ClassInstanceExpr extends Access 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 ClassInstanceExpr clone() throws CloneNotSupportedException { 034 ClassInstanceExpr node = (ClassInstanceExpr)super.clone(); 035 node.isDAafterInstance_Variable_values = null; 036 node.computeDAbefore_int_Variable_values = null; 037 node.computeDUbefore_int_Variable_values = null; 038 node.decls_computed = false; 039 node.decls_value = null; 040 node.decl_computed = false; 041 node.decl_value = null; 042 node.localLookupType_String_values = null; 043 node.type_computed = false; 044 node.type_value = null; 045 node.in$Circle(false); 046 node.is$Final(false); 047 return node; 048 } 049 /** 050 * @apilevel internal 051 */ 052 @SuppressWarnings({"unchecked", "cast"}) 053 public ClassInstanceExpr copy() { 054 055 try { 056 ClassInstanceExpr node = (ClassInstanceExpr) clone(); 057 node.parent = null; 058 if(children != null) 059 node.children = (ASTNode[]) children.clone(); 060 061 return node; 062 } catch (CloneNotSupportedException e) { 063 throw new Error("Error: clone not supported for " + getClass().getName()); 064 } 065 066 }/** 067 * Create a deep copy of the AST subtree at this node. 068 * The copy is dangling, i.e. has no parent. 069 * @return dangling copy of the subtree at this node 070 * @apilevel low-level 071 */ 072 @SuppressWarnings({"unchecked", "cast"}) 073 public ClassInstanceExpr fullCopy() { 074 075 ClassInstanceExpr tree = (ClassInstanceExpr) copy(); 076 if (children != null) { 077 for (int i = 0; i < children.length; ++i) { 078 079 ASTNode child = (ASTNode) children[i]; 080 if(child != null) { 081 child = child.fullCopy(); 082 tree.setChild(child, i); 083 } 084 } 085 } 086 return tree; 087 088 } /** 089 * @ast method 090 * @aspect AccessControl 091 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/AccessControl.jrag:139 092 */ 093 public void accessControl() { 094 super.accessControl(); 095 if(type().isAbstract()) 096 error("Can not instantiate abstract class " + type().fullName()); 097 if(!decl().accessibleFrom(hostType())) 098 error("constructor " + decl().signature() + " is not accessible"); 099 } 100 /** 101 * @ast method 102 * @aspect ExceptionHandling 103 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:119 104 */ 105 public void exceptionHandling() { 106 for (Access exception : decl().getExceptionList()) { 107 TypeDecl exceptionType = exception.type(); 108 if (!handlesException(exceptionType)) 109 error("" + this + " may throw uncaught exception " + 110 exceptionType.fullName() + "; it must be caught or declared as being thrown"); 111 } 112 } 113 /** 114 * @ast method 115 * @aspect ExceptionHandling 116 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:281 117 */ 118 protected boolean reachedException(TypeDecl catchType) { 119 ConstructorDecl decl = decl(); 120 for(int i = 0; i < decl.getNumException(); i++) { 121 TypeDecl exceptionType = decl.getException(i).type(); 122 if(catchType.mayCatch(exceptionType)) 123 return true; 124 } 125 for(int i = 0; i < getNumArg(); i++) { 126 if(getArg(i).reachedException(catchType)) 127 return true; 128 } 129 return false; 130 } 131 /** 132 * @ast method 133 * @aspect TypeScopePropagation 134 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupType.jrag:414 135 */ 136 public SimpleSet keepInnerClasses(SimpleSet c) { 137 SimpleSet newSet = SimpleSet.emptySet; 138 for(Iterator iter = c.iterator(); iter.hasNext(); ) { 139 TypeDecl t = (TypeDecl)iter.next(); 140 if(t.isInnerType() && t.isClassDecl()) { 141 newSet = newSet.add(c); 142 } 143 } 144 return newSet; 145 } 146 /** 147 * @ast method 148 * @aspect NameCheck 149 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/NameCheck.jrag:142 150 */ 151 public void refined_NameCheck_ClassInstanceExpr_nameCheck() { 152 super.nameCheck(); 153 if(decls().isEmpty()) 154 error("can not instantiate " + type().typeName() + " no matching constructor found in " + type().typeName()); 155 else if(decls().size() > 1 && validArgs()) { 156 error("several most specific constructors found"); 157 for(Iterator iter = decls().iterator(); iter.hasNext(); ) { 158 error(" " + ((ConstructorDecl)iter.next()).signature()); 159 } 160 } 161 } 162 /** 163 * @ast method 164 * @aspect NodeConstructors 165 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:82 166 */ 167 public ClassInstanceExpr(Access type, List args) { 168 this(type, args, new Opt()); 169 } 170 /** 171 * @ast method 172 * @aspect PrettyPrint 173 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:327 174 */ 175 public void toString(StringBuffer s) { 176 s.append("new "); 177 getAccess().toString(s); 178 s.append("("); 179 if(getNumArg() > 0) { 180 getArg(0).toString(s); 181 for(int i = 1; i < getNumArg(); i++) { 182 s.append(", "); 183 getArg(i).toString(s); 184 } 185 } 186 s.append(")"); 187 188 if(hasTypeDecl()) { 189 TypeDecl decl = getTypeDecl(); 190 s.append(" {"); 191 for(int i = 0; i < decl.getNumBodyDecl(); i++) { 192 if(!(decl.getBodyDecl(i) instanceof ConstructorDecl)) 193 decl.getBodyDecl(i).toString(s); 194 } 195 s.append(typeDeclIndent()); 196 s.append("}"); 197 } 198 } 199 /** 200 * @ast method 201 * @aspect TypeCheck 202 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeCheck.jrag:434 203 */ 204 public void typeCheck() { 205 if(isQualified() && qualifier().isTypeAccess() && !qualifier().type().isUnknown()) 206 error("*** The expression in a qualified class instance expr must not be a type name"); 207 // 15.9 208 if(isQualified() && !type().isInnerClass() && !((ClassDecl)type()).superclass().isInnerClass() && !type().isUnknown()) { 209 error("*** Qualified class instance creation can only instantiate inner classes and their anonymous subclasses"); 210 } 211 if(!type().isClassDecl()) { 212 error("*** Can only instantiate classes, which " + type().typeName() + " is not"); 213 } 214 typeCheckEnclosingInstance(); 215 typeCheckAnonymousSuperclassEnclosingInstance(); 216 } 217 /** 218 * @ast method 219 * @aspect TypeCheck 220 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeCheck.jrag:448 221 */ 222 public void typeCheckEnclosingInstance() { 223 TypeDecl C = type(); 224 if(!C.isInnerClass()) 225 return; 226 227 TypeDecl enclosing = null; 228 if(C.isAnonymous()) { 229 if(noEnclosingInstance()) { 230 enclosing = null; 231 } 232 else { 233 enclosing = hostType(); 234 } 235 } 236 else if(C.isLocalClass()) { 237 if(C.inStaticContext()) { 238 enclosing = null; 239 } 240 else if(noEnclosingInstance()) { 241 enclosing = unknownType(); 242 } 243 else { 244 TypeDecl nest = hostType(); 245 while(nest != null && !nest.instanceOf(C.enclosingType())) 246 nest = nest.enclosingType(); 247 enclosing = nest; 248 } 249 } 250 else if(C.isMemberType()) { 251 if(!isQualified()) { 252 if(noEnclosingInstance()) { 253 error("No enclosing instance to initialize " + C.typeName() + " with"); 254 //System.err.println("ClassInstanceExpr: Non qualified MemberType " + C.typeName() + " is in a static context when instantiated in " + this); 255 enclosing = unknownType(); 256 } 257 else { 258 TypeDecl nest = hostType(); 259 while(nest != null && !nest.instanceOf(C.enclosingType())) 260 nest = nest.enclosingType(); 261 enclosing = nest == null ? unknownType() : nest; 262 } 263 } 264 else { 265 enclosing = enclosingInstance(); 266 } 267 } 268 if(enclosing != null && !enclosing.instanceOf(type().enclosingType())) { 269 String msg = enclosing == null ? "None" : enclosing.typeName(); 270 error("*** Can not instantiate " + type().typeName() + " with the enclosing instance " + msg + " due to incorrect enclosing instance"); 271 } 272 else if(!isQualified() && C.isMemberType() && inExplicitConstructorInvocation() && enclosing == hostType()) { 273 error("*** The innermost enclosing instance of type " + enclosing.typeName() + " is this which is not yet initialized here."); 274 } 275 } 276 /** 277 * @ast method 278 * @aspect TypeCheck 279 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeCheck.jrag:521 280 */ 281 public void typeCheckAnonymousSuperclassEnclosingInstance() { 282 if(type().isAnonymous() && ((ClassDecl)type()).superclass().isInnerType()) { 283 TypeDecl S = ((ClassDecl)type()).superclass(); 284 if(S.isLocalClass()) { 285 if(S.inStaticContext()) { 286 } 287 else if(noEnclosingInstance()) { 288 error("*** No enclosing instance to class " + type().typeName() + " due to static context"); 289 } 290 else if(inExplicitConstructorInvocation()) 291 error("*** No enclosing instance to superclass " + S.typeName() + " of " + type().typeName() + " since this is not initialized yet"); 292 } 293 else if(S.isMemberType()) { 294 if(!isQualified()) { 295 // 15.9.2 2nd paragraph 296 if(noEnclosingInstance()) { 297 error("*** No enclosing instance to class " + type().typeName() + " due to static context"); 298 } 299 else { 300 TypeDecl nest = hostType(); 301 while(nest != null && !nest.instanceOf(S.enclosingType())) 302 nest = nest.enclosingType(); 303 if(nest == null) { 304 error("*** No enclosing instance to superclass " + S.typeName() + " of " + type().typeName()); 305 } 306 else if(inExplicitConstructorInvocation()) { 307 error("*** No enclosing instance to superclass " + S.typeName() + " of " + type().typeName() + " since this is not initialized yet"); 308 } 309 } 310 } 311 } 312 } 313 } 314 /** 315 * @ast method 316 * @aspect CreateBCode 317 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:669 318 */ 319 private void emitLocalEnclosing(CodeGeneration gen, TypeDecl localClass) { 320 if(!localClass.inStaticContext()) { 321 emitThis(gen, localClass.enclosingType()); 322 } 323 } 324 /** 325 * @ast method 326 * @aspect CreateBCode 327 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:674 328 */ 329 private void emitInnerMemberEnclosing(CodeGeneration gen, TypeDecl innerClass) { 330 if(hasPrevExpr()) { 331 prevExpr().createBCode(gen); 332 gen.emitDup(); 333 int index = gen.constantPool().addMethodref("java/lang/Object", "getClass", "()Ljava/lang/Class;"); 334 gen.emit(Bytecode.INVOKEVIRTUAL, 0).add2(index); 335 gen.emitPop(); 336 } 337 else { 338 TypeDecl enclosing = hostType(); 339 while(enclosing != null && !enclosing.hasType(innerClass.name())) 340 enclosing = enclosing.enclosingType(); 341 if(enclosing == null) 342 throw new Error(errorPrefix() + "Could not find enclosing for " + this); 343 else 344 emitThis(gen, enclosing); 345 } 346 } 347 /** 348 * @ast method 349 * @aspect CreateBCode 350 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:692 351 */ 352 public void createBCode(CodeGeneration gen) { 353 type().emitNew(gen); 354 type().emitDup(gen); 355 356 // 15.9.2 first part 357 if(type().isAnonymous()) { 358 if(type().isAnonymousInNonStaticContext()) { 359 if(type().inExplicitConstructorInvocation()) 360 gen.emit(Bytecode.ALOAD_1); 361 else 362 gen.emit(Bytecode.ALOAD_0); 363 } 364 // 15.9.2 second part 365 ClassDecl C = (ClassDecl)type(); 366 TypeDecl S = C.superclass(); 367 if(S.isLocalClass()) { 368 if(!type().inStaticContext()) 369 emitLocalEnclosing(gen, S); 370 } 371 else if(S.isInnerType()) { 372 emitInnerMemberEnclosing(gen, S); 373 } 374 } 375 else if(type().isLocalClass()) { 376 if(!type().inStaticContext()) 377 emitLocalEnclosing(gen, type()); 378 } 379 else if(type().isInnerType()) { 380 emitInnerMemberEnclosing(gen, type()); 381 } 382 /* 383 // 15.9.2 first part 384 if(type().isAnonymous()) { 385 if(type().isAnonymousInNonStaticContext()) { 386 if(type().inExplicitConstructorInvocation()) 387 gen.emit(Bytecode.ALOAD_1); 388 else 389 gen.emit(Bytecode.ALOAD_0); 390 } 391 if(type().needsSuperEnclosing()) { 392 // 15.9.2 second part 393 ClassDecl C = (ClassDecl)type(); 394 TypeDecl S = C.superclass(); 395 if(S.isLocalClass()) { 396 emitLocalEnclosing(gen, S); 397 } 398 else if(S.isInnerType()) { 399 emitInnerMemberEnclosing(gen, S); 400 } 401 } 402 } 403 else if(type().isLocalClass()) { 404 emitLocalEnclosing(gen, type()); 405 } 406 else if(type().isInnerType()) { 407 emitInnerMemberEnclosing(gen, type()); 408 } 409 */ 410 411 for (int i = 0; i < getNumArg(); ++i) { 412 getArg(i).createBCode(gen); 413 getArg(i).type().emitCastTo(gen, decl().getParameter(i).type()); // MethodInvocationConversion 414 } 415 416 if(decl().isPrivate() && type() != hostType()) { 417 gen.emit(Bytecode.ACONST_NULL); 418 decl().createAccessor().emitInvokeConstructor(gen); 419 } 420 else { 421 decl().emitInvokeConstructor(gen); 422 } 423 } 424 /** 425 * @ast method 426 * @aspect InnerClasses 427 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/InnerClasses.jrag:481 428 */ 429 430 431 // add val$name as arguments to the constructor 432 protected boolean addEnclosingVariables = true; 433 /** 434 * @ast method 435 * @aspect InnerClasses 436 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/InnerClasses.jrag:482 437 */ 438 public void addEnclosingVariables() { 439 if(!addEnclosingVariables) return; 440 addEnclosingVariables = false; 441 decl().addEnclosingVariables(); 442 for(Iterator iter = decl().hostType().enclosingVariables().iterator(); iter.hasNext(); ) { 443 Variable v = (Variable)iter.next(); 444 getArgList().add(new VarAccess(v.name())); 445 } 446 } 447 /** 448 * @ast method 449 * @aspect Transformations 450 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/Transformations.jrag:127 451 */ 452 public void refined_Transformations_ClassInstanceExpr_transformation() { 453 // this$val 454 addEnclosingVariables(); 455 // touch accessorIndex go force creation of private constructorAccessor 456 if(decl().isPrivate() && type() != hostType()) { 457 decl().createAccessor(); 458 } 459 super.transformation(); 460 } 461 /** 462 * @ast method 463 * @aspect Annotations 464 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Annotations.jrag:363 465 */ 466 public void checkModifiers() { 467 if(decl().isDeprecated() && 468 !withinDeprecatedAnnotation() && 469 hostType().topLevelType() != decl().hostType().topLevelType() && 470 !withinSuppressWarnings("deprecation")) 471 warning(decl().signature() + " in " + decl().hostType().typeName() + " has been deprecated"); 472 } 473 /** 474 * @ast method 475 * 476 */ 477 public ClassInstanceExpr() { 478 super(); 479 480 481 } 482 /** 483 * Initializes the child array to the correct size. 484 * Initializes List and Opt nta children. 485 * @apilevel internal 486 * @ast method 487 * @ast method 488 * 489 */ 490 public void init$Children() { 491 children = new ASTNode[3]; 492 setChild(new List(), 1); 493 setChild(new Opt(), 2); 494 } 495 /** 496 * @ast method 497 * 498 */ 499 public ClassInstanceExpr(Access p0, List<Expr> p1, Opt<TypeDecl> p2) { 500 setChild(p0, 0); 501 setChild(p1, 1); 502 setChild(p2, 2); 503 } 504 /** 505 * @apilevel low-level 506 * @ast method 507 * 508 */ 509 protected int numChildren() { 510 return 3; 511 } 512 /** 513 * @apilevel internal 514 * @ast method 515 * 516 */ 517 public boolean mayHaveRewrite() { 518 return false; 519 } 520 /** 521 * Replaces the Access child. 522 * @param node The new node to replace the Access child. 523 * @apilevel high-level 524 * @ast method 525 * 526 */ 527 public void setAccess(Access node) { 528 setChild(node, 0); 529 } 530 /** 531 * Retrieves the Access child. 532 * @return The current node used as the Access child. 533 * @apilevel high-level 534 * @ast method 535 * 536 */ 537 public Access getAccess() { 538 return (Access)getChild(0); 539 } 540 /** 541 * Retrieves the Access child. 542 * <p><em>This method does not invoke AST transformations.</em></p> 543 * @return The current node used as the Access child. 544 * @apilevel low-level 545 * @ast method 546 * 547 */ 548 public Access getAccessNoTransform() { 549 return (Access)getChildNoTransform(0); 550 } 551 /** 552 * Replaces the Arg list. 553 * @param list The new list node to be used as the Arg list. 554 * @apilevel high-level 555 * @ast method 556 * 557 */ 558 public void setArgList(List<Expr> list) { 559 setChild(list, 1); 560 } 561 /** 562 * Retrieves the number of children in the Arg list. 563 * @return Number of children in the Arg list. 564 * @apilevel high-level 565 * @ast method 566 * 567 */ 568 public int getNumArg() { 569 return getArgList().getNumChild(); 570 } 571 /** 572 * Retrieves the number of children in the Arg list. 573 * Calling this method will not trigger rewrites.. 574 * @return Number of children in the Arg list. 575 * @apilevel low-level 576 * @ast method 577 * 578 */ 579 public int getNumArgNoTransform() { 580 return getArgListNoTransform().getNumChildNoTransform(); 581 } 582 /** 583 * Retrieves the element at index {@code i} in the Arg list.. 584 * @param i Index of the element to return. 585 * @return The element at position {@code i} in the Arg list. 586 * @apilevel high-level 587 * @ast method 588 * 589 */ 590 @SuppressWarnings({"unchecked", "cast"}) 591 public Expr getArg(int i) { 592 return (Expr)getArgList().getChild(i); 593 } 594 /** 595 * Append an element to the Arg list. 596 * @param node The element to append to the Arg list. 597 * @apilevel high-level 598 * @ast method 599 * 600 */ 601 public void addArg(Expr node) { 602 List<Expr> list = (parent == null || state == null) ? getArgListNoTransform() : getArgList(); 603 list.addChild(node); 604 } 605 /** 606 * @apilevel low-level 607 * @ast method 608 * 609 */ 610 public void addArgNoTransform(Expr node) { 611 List<Expr> list = getArgListNoTransform(); 612 list.addChild(node); 613 } 614 /** 615 * Replaces the Arg list element at index {@code i} with the new node {@code node}. 616 * @param node The new node to replace the old list element. 617 * @param i The list index of the node to be replaced. 618 * @apilevel high-level 619 * @ast method 620 * 621 */ 622 public void setArg(Expr node, int i) { 623 List<Expr> list = getArgList(); 624 list.setChild(node, i); 625 } 626 /** 627 * Retrieves the Arg list. 628 * @return The node representing the Arg list. 629 * @apilevel high-level 630 * @ast method 631 * 632 */ 633 public List<Expr> getArgs() { 634 return getArgList(); 635 } 636 /** 637 * Retrieves the Arg list. 638 * <p><em>This method does not invoke AST transformations.</em></p> 639 * @return The node representing the Arg list. 640 * @apilevel low-level 641 * @ast method 642 * 643 */ 644 public List<Expr> getArgsNoTransform() { 645 return getArgListNoTransform(); 646 } 647 /** 648 * Retrieves the Arg list. 649 * @return The node representing the Arg list. 650 * @apilevel high-level 651 * @ast method 652 * 653 */ 654 @SuppressWarnings({"unchecked", "cast"}) 655 public List<Expr> getArgList() { 656 List<Expr> list = (List<Expr>)getChild(1); 657 list.getNumChild(); 658 return list; 659 } 660 /** 661 * Retrieves the Arg list. 662 * <p><em>This method does not invoke AST transformations.</em></p> 663 * @return The node representing the Arg list. 664 * @apilevel low-level 665 * @ast method 666 * 667 */ 668 @SuppressWarnings({"unchecked", "cast"}) 669 public List<Expr> getArgListNoTransform() { 670 return (List<Expr>)getChildNoTransform(1); 671 } 672 /** 673 * Replaces the optional node for the TypeDecl child. This is the {@code Opt} node containing the child TypeDecl, not the actual child! 674 * @param opt The new node to be used as the optional node for the TypeDecl child. 675 * @apilevel low-level 676 * @ast method 677 * 678 */ 679 public void setTypeDeclOpt(Opt<TypeDecl> opt) { 680 setChild(opt, 2); 681 } 682 /** 683 * Check whether the optional TypeDecl child exists. 684 * @return {@code true} if the optional TypeDecl child exists, {@code false} if it does not. 685 * @apilevel high-level 686 * @ast method 687 * 688 */ 689 public boolean hasTypeDecl() { 690 return getTypeDeclOpt().getNumChild() != 0; 691 } 692 /** 693 * Retrieves the (optional) TypeDecl child. 694 * @return The TypeDecl child, if it exists. Returns {@code null} otherwise. 695 * @apilevel low-level 696 * @ast method 697 * 698 */ 699 @SuppressWarnings({"unchecked", "cast"}) 700 public TypeDecl getTypeDecl() { 701 return (TypeDecl)getTypeDeclOpt().getChild(0); 702 } 703 /** 704 * Replaces the (optional) TypeDecl child. 705 * @param node The new node to be used as the TypeDecl child. 706 * @apilevel high-level 707 * @ast method 708 * 709 */ 710 public void setTypeDecl(TypeDecl node) { 711 getTypeDeclOpt().setChild(node, 0); 712 } 713 /** 714 * @apilevel low-level 715 * @ast method 716 * 717 */ 718 @SuppressWarnings({"unchecked", "cast"}) 719 public Opt<TypeDecl> getTypeDeclOpt() { 720 return (Opt<TypeDecl>)getChild(2); 721 } 722 /** 723 * Retrieves the optional node for child TypeDecl. This is the {@code Opt} node containing the child TypeDecl, not the actual child! 724 * <p><em>This method does not invoke AST transformations.</em></p> 725 * @return The optional node for child TypeDecl. 726 * @apilevel low-level 727 * @ast method 728 * 729 */ 730 @SuppressWarnings({"unchecked", "cast"}) 731 public Opt<TypeDecl> getTypeDeclOptNoTransform() { 732 return (Opt<TypeDecl>)getChildNoTransform(2); 733 } 734 /** 735 * @ast method 736 * @aspect Enums 737 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Enums.jrag:19 738 */ 739 public void nameCheck() { 740 if(getAccess().type().isEnumDecl() && !enclosingBodyDecl().isEnumConstant()) 741 error("enum types may not be instantiated explicitly"); 742 else 743 refined_NameCheck_ClassInstanceExpr_nameCheck(); 744 } 745 /** 746 * @ast method 747 * @aspect VariableArityParametersCodegen 748 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Backend/VariableArityParametersCodegen.jrag:37 749 */ 750 public void transformation() { 751 if(decl().isVariableArity() && !invokesVariableArityAsArray()) { 752 // arguments to normal parameters 753 List list = new List(); 754 for(int i = 0; i < decl().getNumParameter() - 1; i++) 755 list.add(getArg(i).fullCopy()); 756 // arguments to variable arity parameters 757 List last = new List(); 758 for(int i = decl().getNumParameter() - 1; i < getNumArg(); i++) 759 last.add(getArg(i).fullCopy()); 760 // build an array holding arguments 761 Access typeAccess = decl().lastParameter().type().elementType().createQualifiedAccess(); 762 for(int i = 0; i < decl().lastParameter().type().dimension(); i++) 763 typeAccess = new ArrayTypeAccess(typeAccess); 764 list.add(new ArrayCreationExpr(typeAccess, new Opt(new ArrayInit(last)))); 765 // replace argument list with augemented argument list 766 setArgList(list); 767 } 768 refined_Transformations_ClassInstanceExpr_transformation(); 769 } 770 protected java.util.Map isDAafterInstance_Variable_values; 771 /** 772 * @attribute syn 773 * @aspect DA 774 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:421 775 */ 776 @SuppressWarnings({"unchecked", "cast"}) 777 public boolean isDAafterInstance(Variable v) { 778 Object _parameters = v; 779 if(isDAafterInstance_Variable_values == null) isDAafterInstance_Variable_values = new java.util.HashMap(4); 780 if(isDAafterInstance_Variable_values.containsKey(_parameters)) { 781 return ((Boolean)isDAafterInstance_Variable_values.get(_parameters)).booleanValue(); 782 } 783 ASTNode$State state = state(); 784 int num = state.boundariesCrossed; 785 boolean isFinal = this.is$Final(); 786 boolean isDAafterInstance_Variable_value = isDAafterInstance_compute(v); 787 if(isFinal && num == state().boundariesCrossed){ isDAafterInstance_Variable_values.put(_parameters, Boolean.valueOf(isDAafterInstance_Variable_value)); } 788 return isDAafterInstance_Variable_value; 789 } 790 /** 791 * @apilevel internal 792 */ 793 private boolean isDAafterInstance_compute(Variable v) { 794 if(getNumArg() == 0) 795 return isDAbefore(v); 796 return getArg(getNumArg()-1).isDAafter(v); 797 } 798 /** 799 * @attribute syn 800 * @aspect DA 801 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:235 802 */ 803 public boolean isDAafter(Variable v) { 804 ASTNode$State state = state(); 805 try { return isDAafterInstance(v); } 806 finally { 807 } 808 } 809 protected java.util.Map computeDAbefore_int_Variable_values; 810 /** 811 * @attribute syn 812 * @aspect DA 813 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:428 814 */ 815 @SuppressWarnings({"unchecked", "cast"}) 816 public boolean computeDAbefore(int i, Variable v) { 817 java.util.List _parameters = new java.util.ArrayList(2); 818 _parameters.add(Integer.valueOf(i)); 819 _parameters.add(v); 820 if(computeDAbefore_int_Variable_values == null) computeDAbefore_int_Variable_values = new java.util.HashMap(4); 821 if(computeDAbefore_int_Variable_values.containsKey(_parameters)) { 822 return ((Boolean)computeDAbefore_int_Variable_values.get(_parameters)).booleanValue(); 823 } 824 ASTNode$State state = state(); 825 int num = state.boundariesCrossed; 826 boolean isFinal = this.is$Final(); 827 boolean computeDAbefore_int_Variable_value = computeDAbefore_compute(i, v); 828 if(isFinal && num == state().boundariesCrossed){ computeDAbefore_int_Variable_values.put(_parameters, Boolean.valueOf(computeDAbefore_int_Variable_value)); } 829 return computeDAbefore_int_Variable_value; 830 } 831 /** 832 * @apilevel internal 833 */ 834 private boolean computeDAbefore_compute(int i, Variable v) { return i == 0 ? isDAbefore(v) : getArg(i-1).isDAafter(v); } 835 /** 836 * @attribute syn 837 * @aspect DU 838 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:850 839 */ 840 public boolean isDUafterInstance(Variable v) { 841 ASTNode$State state = state(); 842 try { 843 if(getNumArg() == 0) 844 return isDUbefore(v); 845 return getArg(getNumArg()-1).isDUafter(v); 846 } 847 finally { 848 } 849 } 850 /** 851 * @attribute syn 852 * @aspect DU 853 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:694 854 */ 855 public boolean isDUafter(Variable v) { 856 ASTNode$State state = state(); 857 try { return isDUafterInstance(v); } 858 finally { 859 } 860 } 861 protected java.util.Map computeDUbefore_int_Variable_values; 862 /** 863 * @attribute syn 864 * @aspect DU 865 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:857 866 */ 867 @SuppressWarnings({"unchecked", "cast"}) 868 public boolean computeDUbefore(int i, Variable v) { 869 java.util.List _parameters = new java.util.ArrayList(2); 870 _parameters.add(Integer.valueOf(i)); 871 _parameters.add(v); 872 if(computeDUbefore_int_Variable_values == null) computeDUbefore_int_Variable_values = new java.util.HashMap(4); 873 if(computeDUbefore_int_Variable_values.containsKey(_parameters)) { 874 return ((Boolean)computeDUbefore_int_Variable_values.get(_parameters)).booleanValue(); 875 } 876 ASTNode$State state = state(); 877 int num = state.boundariesCrossed; 878 boolean isFinal = this.is$Final(); 879 boolean computeDUbefore_int_Variable_value = computeDUbefore_compute(i, v); 880 if(isFinal && num == state().boundariesCrossed){ computeDUbefore_int_Variable_values.put(_parameters, Boolean.valueOf(computeDUbefore_int_Variable_value)); } 881 return computeDUbefore_int_Variable_value; 882 } 883 /** 884 * @apilevel internal 885 */ 886 private boolean computeDUbefore_compute(int i, Variable v) { return i == 0 ? isDUbefore(v) : getArg(i-1).isDUafter(v); } 887 /** 888 * @attribute syn 889 * @aspect ConstructScope 890 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:50 891 */ 892 public boolean applicableAndAccessible(ConstructorDecl decl) { 893 ASTNode$State state = state(); 894 try { return decl.applicable(getArgList()) && decl.accessibleFrom(hostType()) && 895 (!decl.isProtected() || hasTypeDecl() || decl.hostPackage().equals(hostPackage())); } 896 finally { 897 } 898 } 899 /** 900 * @apilevel internal 901 */ 902 protected boolean decls_computed = false; 903 /** 904 * @apilevel internal 905 */ 906 protected SimpleSet decls_value; 907 /** 908 * @attribute syn 909 * @aspect MethodSignature15 910 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/MethodSignature.jrag:70 911 */ 912 @SuppressWarnings({"unchecked", "cast"}) 913 public SimpleSet decls() { 914 if(decls_computed) { 915 return decls_value; 916 } 917 ASTNode$State state = state(); 918 int num = state.boundariesCrossed; 919 boolean isFinal = this.is$Final(); 920 decls_value = decls_compute(); 921 if(isFinal && num == state().boundariesCrossed){ decls_computed = true; } 922 return decls_value; 923 } 924 /** 925 * @apilevel internal 926 */ 927 private SimpleSet decls_compute() { 928 TypeDecl typeDecl = hasTypeDecl() ? getTypeDecl() : getAccess().type(); 929 return chooseConstructor(typeDecl.constructors(), getArgList()); 930 } 931 /** 932 * @apilevel internal 933 */ 934 protected boolean decl_computed = false; 935 /** 936 * @apilevel internal 937 */ 938 protected ConstructorDecl decl_value; 939 /** 940 * @attribute syn 941 * @aspect ConstructScope 942 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:78 943 */ 944 @SuppressWarnings({"unchecked", "cast"}) 945 public ConstructorDecl decl() { 946 if(decl_computed) { 947 return decl_value; 948 } 949 ASTNode$State state = state(); 950 int num = state.boundariesCrossed; 951 boolean isFinal = this.is$Final(); 952 decl_value = decl_compute(); 953 if(isFinal && num == state().boundariesCrossed){ decl_computed = true; } 954 return decl_value; 955 } 956 /** 957 * @apilevel internal 958 */ 959 private ConstructorDecl decl_compute() { 960 SimpleSet decls = decls(); 961 if(decls.size() == 1) 962 return (ConstructorDecl)decls.iterator().next(); 963 return unknownConstructor(); 964 } 965 /** 966 * @attribute syn 967 * @aspect TypeScopePropagation 968 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupType.jrag:430 969 */ 970 public SimpleSet qualifiedLookupType(String name) { 971 ASTNode$State state = state(); 972 try { 973 SimpleSet c = keepAccessibleTypes(type().memberTypes(name)); 974 if(!c.isEmpty()) 975 return c; 976 if(type().name().equals(name)) 977 return SimpleSet.emptySet.add(type()); 978 return SimpleSet.emptySet; 979 } 980 finally { 981 } 982 } 983 protected java.util.Map localLookupType_String_values; 984 /** 985 * @attribute syn 986 * @aspect TypeScopePropagation 987 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupType.jrag:472 988 */ 989 @SuppressWarnings({"unchecked", "cast"}) 990 public SimpleSet localLookupType(String name) { 991 Object _parameters = name; 992 if(localLookupType_String_values == null) localLookupType_String_values = new java.util.HashMap(4); 993 if(localLookupType_String_values.containsKey(_parameters)) { 994 return (SimpleSet)localLookupType_String_values.get(_parameters); 995 } 996 ASTNode$State state = state(); 997 int num = state.boundariesCrossed; 998 boolean isFinal = this.is$Final(); 999 SimpleSet localLookupType_String_value = localLookupType_compute(name); 1000 if(isFinal && num == state().boundariesCrossed){ localLookupType_String_values.put(_parameters, localLookupType_String_value); } 1001 return localLookupType_String_value; 1002 } 1003 /** 1004 * @apilevel internal 1005 */ 1006 private SimpleSet localLookupType_compute(String name) { 1007 if(hasTypeDecl() && getTypeDecl().name().equals(name)) 1008 return SimpleSet.emptySet.add(getTypeDecl()); 1009 return SimpleSet.emptySet; 1010 } 1011 /** 1012 * @attribute syn 1013 * @aspect NameCheck 1014 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/NameCheck.jrag:135 1015 */ 1016 public boolean validArgs() { 1017 ASTNode$State state = state(); 1018 try { 1019 for(int i = 0; i < getNumArg(); i++) 1020 if(getArg(i).type().isUnknown()) 1021 return false; 1022 return true; 1023 } 1024 finally { 1025 } 1026 } 1027 /** 1028 * @attribute syn 1029 * @aspect SyntacticClassification 1030 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:56 1031 */ 1032 public NameType predNameType() { 1033 ASTNode$State state = state(); 1034 try { return NameType.EXPRESSION_NAME; } 1035 finally { 1036 } 1037 } 1038 /** 1039 * @apilevel internal 1040 */ 1041 protected boolean type_computed = false; 1042 /** 1043 * @apilevel internal 1044 */ 1045 protected TypeDecl type_value; 1046 /** 1047 * @attribute syn 1048 * @aspect TypeAnalysis 1049 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:311 1050 */ 1051 @SuppressWarnings({"unchecked", "cast"}) 1052 public TypeDecl type() { 1053 if(type_computed) { 1054 return type_value; 1055 } 1056 ASTNode$State state = state(); 1057 int num = state.boundariesCrossed; 1058 boolean isFinal = this.is$Final(); 1059 type_value = type_compute(); 1060 if(isFinal && num == state().boundariesCrossed){ type_computed = true; } 1061 return type_value; 1062 } 1063 /** 1064 * @apilevel internal 1065 */ 1066 private TypeDecl type_compute() { return hasTypeDecl() ? getTypeDecl() : getAccess().type(); } 1067 /** 1068 * @attribute syn 1069 * @aspect TypeCheck 1070 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeCheck.jrag:519 1071 */ 1072 public boolean noEnclosingInstance() { 1073 ASTNode$State state = state(); 1074 try { return isQualified() ? qualifier().staticContextQualifier() : inStaticContext(); } 1075 finally { 1076 } 1077 } 1078 /** 1079 * @attribute syn 1080 * @aspect MethodSignature15 1081 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/MethodSignature.jrag:327 1082 */ 1083 public int arity() { 1084 ASTNode$State state = state(); 1085 try { return getNumArg(); } 1086 finally { 1087 } 1088 } 1089 /** 1090 * @attribute syn 1091 * @aspect VariableArityParameters 1092 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/VariableArityParameters.jrag:54 1093 */ 1094 public boolean invokesVariableArityAsArray() { 1095 ASTNode$State state = state(); 1096 try { 1097 if(!decl().isVariableArity()) 1098 return false; 1099 if(arity() != decl().arity()) 1100 return false; 1101 return getArg(getNumArg()-1).type().methodInvocationConversionTo(decl().lastParameter().type()); 1102 } 1103 finally { 1104 } 1105 } 1106 /** 1107 * @attribute inh 1108 * @aspect ExceptionHandling 1109 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:52 1110 */ 1111 @SuppressWarnings({"unchecked", "cast"}) 1112 public boolean handlesException(TypeDecl exceptionType) { 1113 ASTNode$State state = state(); 1114 boolean handlesException_TypeDecl_value = getParent().Define_boolean_handlesException(this, null, exceptionType); 1115 return handlesException_TypeDecl_value; 1116 } 1117 /** 1118 * @attribute inh 1119 * @aspect ConstructScope 1120 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:27 1121 */ 1122 @SuppressWarnings({"unchecked", "cast"}) 1123 public TypeDecl typeObject() { 1124 ASTNode$State state = state(); 1125 TypeDecl typeObject_value = getParent().Define_TypeDecl_typeObject(this, null); 1126 return typeObject_value; 1127 } 1128 /** 1129 * @attribute inh 1130 * @aspect ConstructScope 1131 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:84 1132 */ 1133 @SuppressWarnings({"unchecked", "cast"}) 1134 public ConstructorDecl unknownConstructor() { 1135 ASTNode$State state = state(); 1136 ConstructorDecl unknownConstructor_value = getParent().Define_ConstructorDecl_unknownConstructor(this, null); 1137 return unknownConstructor_value; 1138 } 1139 /** 1140 * @attribute inh 1141 * @aspect PrettyPrint 1142 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:351 1143 */ 1144 @SuppressWarnings({"unchecked", "cast"}) 1145 public String typeDeclIndent() { 1146 ASTNode$State state = state(); 1147 String typeDeclIndent_value = getParent().Define_String_typeDeclIndent(this, null); 1148 return typeDeclIndent_value; 1149 } 1150 /** 1151 * @attribute inh 1152 * @aspect TypeCheck 1153 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeCheck.jrag:504 1154 */ 1155 @SuppressWarnings({"unchecked", "cast"}) 1156 public TypeDecl enclosingInstance() { 1157 ASTNode$State state = state(); 1158 TypeDecl enclosingInstance_value = getParent().Define_TypeDecl_enclosingInstance(this, null); 1159 return enclosingInstance_value; 1160 } 1161 /** 1162 * @attribute inh 1163 * @aspect TypeHierarchyCheck 1164 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:126 1165 */ 1166 @SuppressWarnings({"unchecked", "cast"}) 1167 public boolean inExplicitConstructorInvocation() { 1168 ASTNode$State state = state(); 1169 boolean inExplicitConstructorInvocation_value = getParent().Define_boolean_inExplicitConstructorInvocation(this, null); 1170 return inExplicitConstructorInvocation_value; 1171 } 1172 /** 1173 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/AnonymousClasses.jrag:15 1174 * @apilevel internal 1175 */ 1176 public TypeDecl Define_TypeDecl_superType(ASTNode caller, ASTNode child) { 1177 if(caller == getTypeDeclOptNoTransform()) { 1178 return getAccess().type(); 1179 } 1180 else { return getParent().Define_TypeDecl_superType(this, caller); 1181 } 1182 } 1183 /** 1184 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/MethodSignature.jrag:83 1185 * @apilevel internal 1186 */ 1187 public ConstructorDecl Define_ConstructorDecl_constructorDecl(ASTNode caller, ASTNode child) { 1188 if(caller == getTypeDeclOptNoTransform()){ 1189 Collection c = getAccess().type().constructors(); 1190 SimpleSet maxSpecific = chooseConstructor(c, getArgList()); 1191 if(maxSpecific.size() == 1) 1192 return (ConstructorDecl)maxSpecific.iterator().next(); 1193 return unknownConstructor(); 1194 } 1195 else { return getParent().Define_ConstructorDecl_constructorDecl(this, caller); 1196 } 1197 } 1198 /** 1199 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:430 1200 * @apilevel internal 1201 */ 1202 public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { 1203 if(caller == getTypeDeclOptNoTransform()) { 1204 return isDAafterInstance(v); 1205 } 1206 else if(caller == getArgListNoTransform()) { 1207 int i = caller.getIndexOfChild(child); 1208 return computeDAbefore(i, v); 1209 } 1210 else { return getParent().Define_boolean_isDAbefore(this, caller, v); 1211 } 1212 } 1213 /** 1214 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:856 1215 * @apilevel internal 1216 */ 1217 public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { 1218 if(caller == getArgListNoTransform()) { 1219 int i = caller.getIndexOfChild(child); 1220 return computeDUbefore(i, v); 1221 } 1222 else { return getParent().Define_boolean_isDUbefore(this, caller, v); 1223 } 1224 } 1225 /** 1226 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupType.jrag:92 1227 * @apilevel internal 1228 */ 1229 public boolean Define_boolean_hasPackage(ASTNode caller, ASTNode child, String packageName) { 1230 if(caller == getArgListNoTransform()) { 1231 int childIndex = caller.getIndexOfChild(child); 1232 return unqualifiedScope().hasPackage(packageName); 1233 } 1234 else { return getParent().Define_boolean_hasPackage(this, caller, packageName); 1235 } 1236 } 1237 /** 1238 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupType.jrag:404 1239 * @apilevel internal 1240 */ 1241 public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { 1242 if(caller == getTypeDeclOptNoTransform()){ 1243 SimpleSet c = localLookupType(name); 1244 if(!c.isEmpty()) 1245 return c; 1246 c = lookupType(name); 1247 if(!c.isEmpty()) 1248 return c; 1249 return unqualifiedScope().lookupType(name); 1250 } 1251 else if(caller == getAccessNoTransform()){ 1252 SimpleSet c = lookupType(name); 1253 if(c.size() == 1) { 1254 if(isQualified()) 1255 c = keepInnerClasses(c); 1256 } 1257 return c; 1258 } 1259 else if(caller == getArgListNoTransform()) { 1260 int childIndex = caller.getIndexOfChild(child); 1261 return unqualifiedScope().lookupType(name); 1262 } 1263 else { return getParent().Define_SimpleSet_lookupType(this, caller, name); 1264 } 1265 } 1266 /** 1267 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/LookupVariable.jrag:137 1268 * @apilevel internal 1269 */ 1270 public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name) { 1271 if(caller == getArgListNoTransform()) { 1272 int childIndex = caller.getIndexOfChild(child); 1273 return unqualifiedScope().lookupVariable(name); 1274 } 1275 else { return getParent().Define_SimpleSet_lookupVariable(this, caller, name); 1276 } 1277 } 1278 /** 1279 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:127 1280 * @apilevel internal 1281 */ 1282 public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { 1283 if(caller == getArgListNoTransform()) { 1284 int childIndex = caller.getIndexOfChild(child); 1285 return NameType.EXPRESSION_NAME; 1286 } 1287 else if(caller == getTypeDeclOptNoTransform()) { 1288 return NameType.TYPE_NAME; 1289 } 1290 else if(caller == getAccessNoTransform()) { 1291 return NameType.TYPE_NAME; 1292 } 1293 else { return getParent().Define_NameType_nameType(this, caller); 1294 } 1295 } 1296 /** 1297 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:217 1298 * @apilevel internal 1299 */ 1300 public boolean Define_boolean_isAnonymous(ASTNode caller, ASTNode child) { 1301 if(caller == getTypeDeclOptNoTransform()) { 1302 return true; 1303 } 1304 else { return getParent().Define_boolean_isAnonymous(this, caller); 1305 } 1306 } 1307 /** 1308 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:530 1309 * @apilevel internal 1310 */ 1311 public boolean Define_boolean_isMemberType(ASTNode caller, ASTNode child) { 1312 if(caller == getTypeDeclOptNoTransform()) { 1313 return false; 1314 } 1315 else { return getParent().Define_boolean_isMemberType(this, caller); 1316 } 1317 } 1318 /** 1319 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:576 1320 * @apilevel internal 1321 */ 1322 public TypeDecl Define_TypeDecl_hostType(ASTNode caller, ASTNode child) { 1323 if(caller == getTypeDeclOptNoTransform()) { 1324 return hostType(); 1325 } 1326 else { return getParent().Define_TypeDecl_hostType(this, caller); 1327 } 1328 } 1329 /** 1330 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:147 1331 * @apilevel internal 1332 */ 1333 public boolean Define_boolean_inStaticContext(ASTNode caller, ASTNode child) { 1334 if(caller == getTypeDeclOptNoTransform()) { 1335 return isQualified() ? 1336 qualifier().staticContextQualifier() : inStaticContext(); 1337 } 1338 else { return getParent().Define_boolean_inStaticContext(this, caller); 1339 } 1340 } 1341 /** 1342 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/TypeInference.jrag:69 1343 * @apilevel internal 1344 */ 1345 public ClassInstanceExpr Define_ClassInstanceExpr_getClassInstanceExpr(ASTNode caller, ASTNode child) { 1346 if(caller == getAccessNoTransform()) { 1347 return this; 1348 } 1349 else { return getParent().Define_ClassInstanceExpr_getClassInstanceExpr(this, caller); 1350 } 1351 } 1352 /** 1353 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/TypeInference.jrag:457 1354 * @apilevel internal 1355 */ 1356 public boolean Define_boolean_isAnonymousDecl(ASTNode caller, ASTNode child) { 1357 if(caller == getAccessNoTransform()) { 1358 return hasTypeDecl(); 1359 } 1360 else { return getParent().Define_boolean_isAnonymousDecl(this, caller); 1361 } 1362 } 1363 /** 1364 * @apilevel internal 1365 */ 1366 public ASTNode rewriteTo() { 1367 return super.rewriteTo(); 1368 } 1369 }