001 /* This file was generated with JastAdd2 (http://jastadd.org) version 2.1.13-12-g880e696 */ 002 package org.extendj.ast; 003 004 import java.util.HashSet; 005 import java.io.File; 006 import java.util.Set; 007 import java.util.Collections; 008 import java.util.Collection; 009 import java.util.ArrayList; 010 import beaver.*; 011 import java.util.*; 012 import java.io.ByteArrayOutputStream; 013 import java.io.PrintStream; 014 import java.lang.reflect.InvocationTargetException; 015 import java.lang.reflect.Method; 016 import org.jastadd.util.*; 017 import java.util.zip.*; 018 import java.io.*; 019 import org.jastadd.util.PrettyPrintable; 020 import org.jastadd.util.PrettyPrinter; 021 import java.io.FileNotFoundException; 022 import java.io.BufferedInputStream; 023 import java.io.DataInputStream; 024 /** 025 * @ast node 026 * @declaredat /home/jesper/git/extendj/java4/grammar/Java.ast:1 027 * @production Program : {@link ASTNode} ::= <span class="component">{@link CompilationUnit}*</span>; 028 029 */ 030 public class Program extends ASTNode<ASTNode> implements Cloneable { 031 /** 032 * @aspect ClassPath 033 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:50 034 */ 035 protected BytecodeReader bytecodeReader; 036 /** 037 * @aspect ClassPath 038 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:52 039 */ 040 public void initBytecodeReader(BytecodeReader r) { 041 bytecodeReader = r; 042 } 043 /** 044 * @aspect ClassPath 045 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:56 046 */ 047 protected JavaParser javaParser; 048 /** 049 * @aspect ClassPath 050 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:58 051 */ 052 public void initJavaParser(JavaParser p) { 053 javaParser = p; 054 } 055 /** 056 * Parse the source file and add the compilation unit to the list of 057 * compilation units in the program. 058 * 059 * @param fileName file name of the source file 060 * @return The CompilationUnit representing the source file, 061 * or <code>null</code> if the source file could not be parsed 062 * @aspect ClassPath 063 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:89 064 */ 065 public CompilationUnit addSourceFile(String fileName) throws IOException { 066 SourceFilePath pathPart = new SourceFilePath(fileName); 067 CompilationUnit cu = pathPart.getCompilationUnit(this, fileName); 068 if (cu != emptyCompilationUnit()) { 069 classPath.addPackage(cu.packageName()); 070 addCompilationUnit(cu); 071 } 072 return cu; 073 } 074 /** 075 * Iterate over all source files and on-demand loaded compilation units. 076 * @aspect ClassPath 077 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:102 078 */ 079 public Iterator<CompilationUnit> compilationUnitIterator() { 080 return new Iterator<CompilationUnit>() { 081 int index = 0; 082 public boolean hasNext() { 083 return index < getNumCompilationUnit(); 084 } 085 public CompilationUnit next() { 086 if (getNumCompilationUnit() == index) { 087 throw new java.util.NoSuchElementException(); 088 } 089 return getCompilationUnit(index++); 090 } 091 public void remove() { 092 throw new UnsupportedOperationException(); 093 } 094 }; 095 } 096 /** 097 * Get the input stream for a compilation unit specified using a canonical 098 * name. This is used by the bytecode reader to load nested types. 099 * @param name The canonical name of the compilation unit. 100 * @aspect ClassPath 101 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:125 102 */ 103 public InputStream getInputStream(String name) { 104 return classPath.getInputStream(name); 105 } 106 /** 107 * @aspect ClassPath 108 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:129 109 */ 110 private final ClassPath classPath = new ClassPath(this); 111 /** 112 * @return <code>true</code> if there is a package with the given name on 113 * the classpath 114 * @aspect ClassPath 115 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:392 116 */ 117 public boolean isPackage(String packageName) { 118 return classPath.isPackage(packageName); 119 } 120 /** 121 * Add a path part to the library class path. 122 * @aspect ClassPath 123 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:412 124 */ 125 public void addClassPath(PathPart pathPart) { 126 classPath.addClassPath(pathPart); 127 } 128 /** 129 * Add a path part to the user class path. 130 * @aspect ClassPath 131 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:419 132 */ 133 public void addSourcePath(PathPart pathPart) { 134 classPath.addSourcePath(pathPart); 135 } 136 /** 137 * @aspect FrontendMain 138 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:37 139 */ 140 public long javaParseTime; 141 /** 142 * @aspect FrontendMain 143 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:38 144 */ 145 public long bytecodeParseTime; 146 /** 147 * @aspect FrontendMain 148 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:39 149 */ 150 public long codeGenTime; 151 /** 152 * @aspect FrontendMain 153 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:40 154 */ 155 public long errorCheckTime; 156 /** 157 * @aspect FrontendMain 158 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:41 159 */ 160 public int numJavaFiles; 161 /** 162 * @aspect FrontendMain 163 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:42 164 */ 165 public int numClassFiles; 166 /** 167 * Reset the profile statistics. 168 * @aspect FrontendMain 169 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:47 170 */ 171 public void resetStatistics() { 172 javaParseTime = 0; 173 bytecodeParseTime = 0; 174 codeGenTime = 0; 175 errorCheckTime = 0; 176 numJavaFiles = 0; 177 numClassFiles = 0; 178 } 179 /** 180 * @aspect FrontendMain 181 * @declaredat /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag:56 182 */ 183 public void printStatistics(PrintStream out) { 184 out.println("javaParseTime: " + javaParseTime); 185 out.println("numJavaFiles: " + numJavaFiles); 186 out.println("bytecodeParseTime: " + javaParseTime); 187 out.println("numClassFiles: " + numClassFiles); 188 out.println("errorCheckTime: " + errorCheckTime); 189 out.println("codeGenTime: " + codeGenTime); 190 } 191 /** 192 * @aspect LibraryCompilationUnits 193 * @declaredat /home/jesper/git/extendj/java4/frontend/LibCompilationUnits.jadd:32 194 */ 195 public Map<String, CompilationUnit> getLibCompilationUnitValueMap() { 196 197 return getLibCompilationUnit_String_values; 198 } 199 /** 200 * @aspect LookupFullyQualifiedTypes 201 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:135 202 */ 203 public int classFileReadTime; 204 /** 205 * Extra cache for source type lookups. This cache is important in order to 206 * make all source types shadow library types with matching names, even when 207 * the source type lives in a compilation unit with a different simple name. 208 * @aspect LookupFullyQualifiedTypes 209 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:164 210 */ 211 private final Map<String, TypeDecl> sourceTypeMap = new HashMap<String, TypeDecl>(); 212 /** 213 * @aspect LookupFullyQualifiedTypes 214 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:165 215 */ 216 private boolean sourceTypeMapInitialized = false; 217 /** 218 * Lookup a type among source classes. 219 * <p> 220 * Invoking this method may cause more than just the specified type to be loaded, for 221 * example if there exists other types in the same source file, the additional 222 * types are also loaded and cached for the next lookup. 223 * <p> 224 * This method is not an attribute due to the necessary side-effects caused 225 * by loading and caching of extra types. 226 * @aspect LookupFullyQualifiedTypes 227 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:177 228 */ 229 protected TypeDecl lookupSourceType(String packageName, String typeName) { 230 String fullName = packageName.equals("") ? typeName : packageName + "." + typeName; 231 232 if (!sourceTypeMapInitialized) { 233 initializeSourceTypeMap(); 234 sourceTypeMapInitialized = true; 235 } 236 237 if (sourceTypeMap.containsKey(fullName)) { 238 return sourceTypeMap.get(fullName); 239 } else { 240 sourceTypeMap.put(fullName, unknownType()); 241 } 242 243 // Look for a matching library type. 244 return unknownType(); 245 } 246 /** 247 * Initialize source types in the source type map. This puts all the types provided by 248 * Program.addSourceFile() in a map for lookup by Program.lookupSourceType. 249 * @aspect LookupFullyQualifiedTypes 250 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:199 251 */ 252 private void initializeSourceTypeMap() { 253 // Initialize source type map with the compilation units supplied by Program.addSourceFile. 254 for (int i = 0; i < getNumCompilationUnit(); i++) { 255 CompilationUnit unit = getCompilationUnit(i); 256 for (int j = 0; j < unit.getNumTypeDecl(); j++) { 257 TypeDecl type = unit.getTypeDecl(j); 258 sourceTypeMap.put(type.fullName(), type); 259 } 260 } 261 } 262 /** 263 * Extra cache for library type lookups. This cache does not have a big 264 * effect on performance due to the caching of the parameterized 265 * lookupLibraryType attribute. The cache is needed to be able to track library types 266 * that are declared in compilation units with a different simple name than the type itself. 267 * @aspect LookupFullyQualifiedTypes 268 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:216 269 */ 270 private final Map<String, TypeDecl> libraryTypeMap = new HashMap<String, TypeDecl>(); 271 /** 272 * @aspect LookupFullyQualifiedTypes 273 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:217 274 */ 275 private boolean libraryTypeMapInitialized = false; 276 /** 277 * Lookup a type among library classes. The lookup includes Jar and source files. 278 * <p> 279 * Invoking this method may cause more than just the specified type to be loaded, for 280 * example if there exists other types in the same source file, the additional 281 * types are also loaded and cached for the next lookup. 282 * <p> 283 * This method is not an attribute due to the necessary side-effects caused 284 * by loading and caching of extra types. 285 * @aspect LookupFullyQualifiedTypes 286 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:229 287 */ 288 protected TypeDecl lookupLibraryType(String packageName, String typeName) { 289 String fullName = packageName.equals("") ? typeName : packageName + "." + typeName; 290 291 if (!libraryTypeMapInitialized) { 292 initializeLibraryTypeMap(); 293 libraryTypeMapInitialized = true; 294 } 295 296 if (libraryTypeMap.containsKey(fullName)) { 297 return libraryTypeMap.get(fullName); 298 } 299 300 // Lookup the type in the library class path. 301 CompilationUnit libraryUnit = getLibCompilationUnit(fullName); 302 303 // Add all types from the compilation unit in the library type map so that we can find them on 304 // the next type lookup. If we don't do this lookup might incorrectly miss a type that is not 305 // declared in a Java source file with a matching name. 306 for (int j = 0; j < libraryUnit.getNumTypeDecl(); j++) { 307 TypeDecl type = libraryUnit.getTypeDecl(j); 308 if (!libraryTypeMap.containsKey(type.fullName())) { 309 libraryTypeMap.put(type.fullName(), type); 310 } 311 } 312 313 if (libraryTypeMap.containsKey(fullName)) { 314 return libraryTypeMap.get(fullName); 315 } else { 316 libraryTypeMap.put(fullName, unknownType()); 317 return unknownType(); 318 } 319 } 320 /** Initialize primitive types in the library type map. 321 * @aspect LookupFullyQualifiedTypes 322 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:263 323 */ 324 private void initializeLibraryTypeMap() { 325 PrimitiveCompilationUnit unit = getPrimitiveCompilationUnit(); 326 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".boolean", unit.typeBoolean()); 327 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".byte", unit.typeByte()); 328 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".short", unit.typeShort()); 329 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".char", unit.typeChar()); 330 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".int", unit.typeInt()); 331 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".long", unit.typeLong()); 332 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".float", unit.typeFloat()); 333 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".double", unit.typeDouble()); 334 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".null", unit.typeNull()); 335 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".void", unit.typeVoid()); 336 libraryTypeMap.put(PRIMITIVE_PACKAGE_NAME + ".Unknown", unit.unknownType()); 337 } 338 /** 339 * @aspect AddOptionsToProgram 340 * @declaredat /home/jesper/git/extendj/java4/frontend/Options.jadd:34 341 */ 342 public Options options = new Options(); 343 /** 344 * @aspect AddOptionsToProgram 345 * @declaredat /home/jesper/git/extendj/java4/frontend/Options.jadd:35 346 */ 347 public Options options() { 348 return options; 349 } 350 /** 351 * @aspect PrettyPrintUtil 352 * @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrintUtil.jrag:79 353 */ 354 public void prettyPrint(PrettyPrinter out) { 355 for (Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { 356 CompilationUnit cu = (CompilationUnit) iter.next(); 357 if (cu.fromSource()) { 358 out.print(cu); 359 } 360 } 361 } 362 /** 363 * @aspect GenerateClassfile 364 * @declaredat /home/jesper/git/extendj/java4/backend/GenerateClassfile.jrag:32 365 */ 366 public void generateClassfile() { 367 for (Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { 368 CompilationUnit cu = (CompilationUnit) iter.next(); 369 cu.generateClassfile(); 370 } 371 } 372 /** 373 * @declaredat ASTNode:1 374 */ 375 public Program() { 376 super(); 377 is$Final(true); 378 } 379 /** 380 * Initializes the child array to the correct size. 381 * Initializes List and Opt nta children. 382 * @apilevel internal 383 * @ast method 384 * @declaredat ASTNode:11 385 */ 386 public void init$Children() { 387 children = new ASTNode[1]; 388 setChild(new List(), 0); 389 } 390 /** 391 * @declaredat ASTNode:15 392 */ 393 public Program(List<CompilationUnit> p0) { 394 setChild(p0, 0); 395 is$Final(true); 396 } 397 /** 398 * @apilevel low-level 399 * @declaredat ASTNode:22 400 */ 401 protected int numChildren() { 402 return 1; 403 } 404 /** 405 * @apilevel internal 406 * @declaredat ASTNode:28 407 */ 408 public boolean mayHaveRewrite() { 409 return false; 410 } 411 /** 412 * @apilevel internal 413 * @declaredat ASTNode:34 414 */ 415 public void flushAttrCache() { 416 super.flushAttrCache(); 417 getCompilationUnit_String_reset(); 418 typeObject_reset(); 419 typeCloneable_reset(); 420 typeSerializable_reset(); 421 typeBoolean_reset(); 422 typeByte_reset(); 423 typeShort_reset(); 424 typeChar_reset(); 425 typeInt_reset(); 426 typeLong_reset(); 427 typeFloat_reset(); 428 typeDouble_reset(); 429 typeString_reset(); 430 typeVoid_reset(); 431 typeNull_reset(); 432 unknownType_reset(); 433 hasPackage_String_reset(); 434 lookupType_String_String_reset(); 435 getLibCompilationUnit_String_reset(); 436 emptyCompilationUnit_reset(); 437 getPrimitiveCompilationUnit_reset(); 438 unknownConstructor_reset(); 439 wildcards_reset(); 440 } 441 /** 442 * @apilevel internal 443 * @declaredat ASTNode:63 444 */ 445 public void flushCollectionCache() { 446 super.flushCollectionCache(); 447 collect_contributors_BlockLambdaBody_lambdaReturns = false; 448 } 449 /** 450 * @apilevel internal 451 * @declaredat ASTNode:70 452 */ 453 public void flushRewriteCache() { 454 super.flushRewriteCache(); 455 } 456 /** 457 * @apilevel internal 458 * @declaredat ASTNode:76 459 */ 460 public Program clone() throws CloneNotSupportedException { 461 Program node = (Program) super.clone(); 462 return node; 463 } 464 /** 465 * @apilevel internal 466 * @declaredat ASTNode:83 467 */ 468 public Program copy() { 469 try { 470 Program node = (Program) clone(); 471 node.parent = null; 472 if (children != null) { 473 node.children = (ASTNode[]) children.clone(); 474 } 475 return node; 476 } catch (CloneNotSupportedException e) { 477 throw new Error("Error: clone not supported for " + getClass().getName()); 478 } 479 } 480 /** 481 * Create a deep copy of the AST subtree at this node. 482 * The copy is dangling, i.e. has no parent. 483 * @return dangling copy of the subtree at this node 484 * @apilevel low-level 485 * @deprecated Please use treeCopy or treeCopyNoTransform instead 486 * @declaredat ASTNode:102 487 */ 488 @Deprecated 489 public Program fullCopy() { 490 return treeCopyNoTransform(); 491 } 492 /** 493 * Create a deep copy of the AST subtree at this node. 494 * The copy is dangling, i.e. has no parent. 495 * @return dangling copy of the subtree at this node 496 * @apilevel low-level 497 * @declaredat ASTNode:112 498 */ 499 public Program treeCopyNoTransform() { 500 Program tree = (Program) copy(); 501 if (children != null) { 502 for (int i = 0; i < children.length; ++i) { 503 ASTNode child = (ASTNode) children[i]; 504 if (child != null) { 505 child = child.treeCopyNoTransform(); 506 tree.setChild(child, i); 507 } 508 } 509 } 510 return tree; 511 } 512 /** 513 * Create a deep copy of the AST subtree at this node. 514 * The subtree of this node is traversed to trigger rewrites before copy. 515 * The copy is dangling, i.e. has no parent. 516 * @return dangling copy of the subtree at this node 517 * @apilevel low-level 518 * @declaredat ASTNode:132 519 */ 520 public Program treeCopy() { 521 doFullTraversal(); 522 return treeCopyNoTransform(); 523 } 524 /** 525 * @apilevel internal 526 * @declaredat ASTNode:139 527 */ 528 protected boolean is$Equal(ASTNode node) { 529 return super.is$Equal(node); 530 } 531 /** 532 * Replaces the CompilationUnit list. 533 * @param list The new list node to be used as the CompilationUnit list. 534 * @apilevel high-level 535 */ 536 public void setCompilationUnitList(List<CompilationUnit> list) { 537 setChild(list, 0); 538 } 539 /** 540 * Retrieves the number of children in the CompilationUnit list. 541 * @return Number of children in the CompilationUnit list. 542 * @apilevel high-level 543 */ 544 public int getNumCompilationUnit() { 545 return getCompilationUnitList().getNumChild(); 546 } 547 /** 548 * Retrieves the number of children in the CompilationUnit list. 549 * Calling this method will not trigger rewrites. 550 * @return Number of children in the CompilationUnit list. 551 * @apilevel low-level 552 */ 553 public int getNumCompilationUnitNoTransform() { 554 return getCompilationUnitListNoTransform().getNumChildNoTransform(); 555 } 556 /** 557 * Retrieves the element at index {@code i} in the CompilationUnit list. 558 * @param i Index of the element to return. 559 * @return The element at position {@code i} in the CompilationUnit list. 560 * @apilevel high-level 561 */ 562 public CompilationUnit getCompilationUnit(int i) { 563 return (CompilationUnit) getCompilationUnitList().getChild(i); 564 } 565 /** 566 * Check whether the CompilationUnit list has any children. 567 * @return {@code true} if it has at least one child, {@code false} otherwise. 568 * @apilevel high-level 569 */ 570 public boolean hasCompilationUnit() { 571 return getCompilationUnitList().getNumChild() != 0; 572 } 573 /** 574 * Append an element to the CompilationUnit list. 575 * @param node The element to append to the CompilationUnit list. 576 * @apilevel high-level 577 */ 578 public void addCompilationUnit(CompilationUnit node) { 579 List<CompilationUnit> list = (parent == null) ? getCompilationUnitListNoTransform() : getCompilationUnitList(); 580 list.addChild(node); 581 } 582 /** 583 * @apilevel low-level 584 */ 585 public void addCompilationUnitNoTransform(CompilationUnit node) { 586 List<CompilationUnit> list = getCompilationUnitListNoTransform(); 587 list.addChild(node); 588 } 589 /** 590 * Replaces the CompilationUnit 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 */ 595 public void setCompilationUnit(CompilationUnit node, int i) { 596 List<CompilationUnit> list = getCompilationUnitList(); 597 list.setChild(node, i); 598 } 599 /** 600 * Retrieves the CompilationUnit list. 601 * @return The node representing the CompilationUnit list. 602 * @apilevel high-level 603 */ 604 @ASTNodeAnnotation.ListChild(name="CompilationUnit") 605 public List<CompilationUnit> getCompilationUnitList() { 606 List<CompilationUnit> list = (List<CompilationUnit>) getChild(0); 607 return list; 608 } 609 /** 610 * Retrieves the CompilationUnit list. 611 * <p><em>This method does not invoke AST transformations.</em></p> 612 * @return The node representing the CompilationUnit list. 613 * @apilevel low-level 614 */ 615 public List<CompilationUnit> getCompilationUnitListNoTransform() { 616 return (List<CompilationUnit>) getChildNoTransform(0); 617 } 618 /** 619 * Retrieves the CompilationUnit list. 620 * @return The node representing the CompilationUnit list. 621 * @apilevel high-level 622 */ 623 public List<CompilationUnit> getCompilationUnits() { 624 return getCompilationUnitList(); 625 } 626 /** 627 * Retrieves the CompilationUnit list. 628 * <p><em>This method does not invoke AST transformations.</em></p> 629 * @return The node representing the CompilationUnit list. 630 * @apilevel low-level 631 */ 632 public List<CompilationUnit> getCompilationUnitsNoTransform() { 633 return getCompilationUnitListNoTransform(); 634 } 635 /** 636 * @aspect <NoAspect> 637 * @declaredat /home/jesper/git/extendj/java8/frontend/LambdaBody.jrag:47 638 */ 639 private boolean collect_contributors_BlockLambdaBody_lambdaReturns = false; 640 protected void collect_contributors_BlockLambdaBody_lambdaReturns() { 641 if (collect_contributors_BlockLambdaBody_lambdaReturns) { 642 return; 643 } 644 super.collect_contributors_BlockLambdaBody_lambdaReturns(); 645 collect_contributors_BlockLambdaBody_lambdaReturns = true; 646 } 647 648 /** 649 * @apilevel internal 650 */ 651 protected java.util.Map getCompilationUnit_String_values; 652 /** 653 * @apilevel internal 654 */ 655 private void getCompilationUnit_String_reset() { 656 getCompilationUnit_String_values = null; 657 } 658 /** 659 * Load a compilation unit from disk, selecting a class file 660 * if one exists that is not older than a corresponding source 661 * file, otherwise the source file is selected. 662 * <p> 663 * This method is called by the LibCompilationUnit NTA. We rely on the 664 * result of this method being cached because it will return a newly parsed 665 * compilation unit each time it is called. 666 * 667 * @return the loaded compilation unit, or the empty compilation unit if no compilation unit was 668 * found. 669 * @attribute syn 670 * @aspect ClassPath 671 * @declaredat /home/jesper/git/extendj/java4/frontend/ClassPath.jrag:385 672 */ 673 @ASTNodeAnnotation.Attribute 674 public CompilationUnit getCompilationUnit(String typeName) { 675 Object _parameters = typeName; 676 if (getCompilationUnit_String_values == null) getCompilationUnit_String_values = new org.jastadd.util.RobustMap(new java.util.HashMap()); 677 ASTNode$State state = state(); 678 if (getCompilationUnit_String_values.containsKey(_parameters)) { 679 return (CompilationUnit) getCompilationUnit_String_values.get(_parameters); 680 } 681 boolean intermediate = state.INTERMEDIATE_VALUE; 682 state.INTERMEDIATE_VALUE = false; 683 int num = state.boundariesCrossed; 684 boolean isFinal = this.is$Final(); 685 CompilationUnit getCompilationUnit_String_value = classPath.getCompilationUnit(typeName, emptyCompilationUnit()); 686 if (isFinal && num == state().boundariesCrossed) { 687 getCompilationUnit_String_values.put(_parameters, getCompilationUnit_String_value); 688 } else { 689 } 690 state.INTERMEDIATE_VALUE |= intermediate; 691 692 return getCompilationUnit_String_value; 693 } 694 /** 695 * @apilevel internal 696 */ 697 protected boolean typeObject_computed = false; 698 /** 699 * @apilevel internal 700 */ 701 protected TypeDecl typeObject_value; 702 /** 703 * @apilevel internal 704 */ 705 private void typeObject_reset() { 706 typeObject_computed = false; 707 typeObject_value = null; 708 } 709 /** 710 * @attribute syn 711 * @aspect SpecialClasses 712 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:37 713 */ 714 @ASTNodeAnnotation.Attribute 715 public TypeDecl typeObject() { 716 ASTNode$State state = state(); 717 if (typeObject_computed) { 718 return typeObject_value; 719 } 720 boolean intermediate = state.INTERMEDIATE_VALUE; 721 state.INTERMEDIATE_VALUE = false; 722 int num = state.boundariesCrossed; 723 boolean isFinal = this.is$Final(); 724 typeObject_value = lookupType("java.lang", "Object"); 725 if (isFinal && num == state().boundariesCrossed) { 726 typeObject_computed = true; 727 } else { 728 } 729 state.INTERMEDIATE_VALUE |= intermediate; 730 731 return typeObject_value; 732 } 733 /** 734 * @apilevel internal 735 */ 736 protected boolean typeCloneable_computed = false; 737 /** 738 * @apilevel internal 739 */ 740 protected TypeDecl typeCloneable_value; 741 /** 742 * @apilevel internal 743 */ 744 private void typeCloneable_reset() { 745 typeCloneable_computed = false; 746 typeCloneable_value = null; 747 } 748 /** 749 * @attribute syn 750 * @aspect SpecialClasses 751 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:38 752 */ 753 @ASTNodeAnnotation.Attribute 754 public TypeDecl typeCloneable() { 755 ASTNode$State state = state(); 756 if (typeCloneable_computed) { 757 return typeCloneable_value; 758 } 759 boolean intermediate = state.INTERMEDIATE_VALUE; 760 state.INTERMEDIATE_VALUE = false; 761 int num = state.boundariesCrossed; 762 boolean isFinal = this.is$Final(); 763 typeCloneable_value = lookupType("java.lang", "Cloneable"); 764 if (isFinal && num == state().boundariesCrossed) { 765 typeCloneable_computed = true; 766 } else { 767 } 768 state.INTERMEDIATE_VALUE |= intermediate; 769 770 return typeCloneable_value; 771 } 772 /** 773 * @apilevel internal 774 */ 775 protected boolean typeSerializable_computed = false; 776 /** 777 * @apilevel internal 778 */ 779 protected TypeDecl typeSerializable_value; 780 /** 781 * @apilevel internal 782 */ 783 private void typeSerializable_reset() { 784 typeSerializable_computed = false; 785 typeSerializable_value = null; 786 } 787 /** 788 * @attribute syn 789 * @aspect SpecialClasses 790 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:39 791 */ 792 @ASTNodeAnnotation.Attribute 793 public TypeDecl typeSerializable() { 794 ASTNode$State state = state(); 795 if (typeSerializable_computed) { 796 return typeSerializable_value; 797 } 798 boolean intermediate = state.INTERMEDIATE_VALUE; 799 state.INTERMEDIATE_VALUE = false; 800 int num = state.boundariesCrossed; 801 boolean isFinal = this.is$Final(); 802 typeSerializable_value = lookupType("java.io", "Serializable"); 803 if (isFinal && num == state().boundariesCrossed) { 804 typeSerializable_computed = true; 805 } else { 806 } 807 state.INTERMEDIATE_VALUE |= intermediate; 808 809 return typeSerializable_value; 810 } 811 /** 812 * @apilevel internal 813 */ 814 protected boolean typeBoolean_computed = false; 815 /** 816 * @apilevel internal 817 */ 818 protected TypeDecl typeBoolean_value; 819 /** 820 * @apilevel internal 821 */ 822 private void typeBoolean_reset() { 823 typeBoolean_computed = false; 824 typeBoolean_value = null; 825 } 826 /** 827 * @attribute syn 828 * @aspect SpecialClasses 829 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:45 830 */ 831 @ASTNodeAnnotation.Attribute 832 public TypeDecl typeBoolean() { 833 ASTNode$State state = state(); 834 if (typeBoolean_computed) { 835 return typeBoolean_value; 836 } 837 boolean intermediate = state.INTERMEDIATE_VALUE; 838 state.INTERMEDIATE_VALUE = false; 839 int num = state.boundariesCrossed; 840 boolean isFinal = this.is$Final(); 841 typeBoolean_value = getPrimitiveCompilationUnit().typeBoolean(); 842 if (isFinal && num == state().boundariesCrossed) { 843 typeBoolean_computed = true; 844 } else { 845 } 846 state.INTERMEDIATE_VALUE |= intermediate; 847 848 return typeBoolean_value; 849 } 850 /** 851 * @apilevel internal 852 */ 853 protected boolean typeByte_computed = false; 854 /** 855 * @apilevel internal 856 */ 857 protected TypeDecl typeByte_value; 858 /** 859 * @apilevel internal 860 */ 861 private void typeByte_reset() { 862 typeByte_computed = false; 863 typeByte_value = null; 864 } 865 /** 866 * @attribute syn 867 * @aspect SpecialClasses 868 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:46 869 */ 870 @ASTNodeAnnotation.Attribute 871 public TypeDecl typeByte() { 872 ASTNode$State state = state(); 873 if (typeByte_computed) { 874 return typeByte_value; 875 } 876 boolean intermediate = state.INTERMEDIATE_VALUE; 877 state.INTERMEDIATE_VALUE = false; 878 int num = state.boundariesCrossed; 879 boolean isFinal = this.is$Final(); 880 typeByte_value = getPrimitiveCompilationUnit().typeByte(); 881 if (isFinal && num == state().boundariesCrossed) { 882 typeByte_computed = true; 883 } else { 884 } 885 state.INTERMEDIATE_VALUE |= intermediate; 886 887 return typeByte_value; 888 } 889 /** 890 * @apilevel internal 891 */ 892 protected boolean typeShort_computed = false; 893 /** 894 * @apilevel internal 895 */ 896 protected TypeDecl typeShort_value; 897 /** 898 * @apilevel internal 899 */ 900 private void typeShort_reset() { 901 typeShort_computed = false; 902 typeShort_value = null; 903 } 904 /** 905 * @attribute syn 906 * @aspect SpecialClasses 907 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:47 908 */ 909 @ASTNodeAnnotation.Attribute 910 public TypeDecl typeShort() { 911 ASTNode$State state = state(); 912 if (typeShort_computed) { 913 return typeShort_value; 914 } 915 boolean intermediate = state.INTERMEDIATE_VALUE; 916 state.INTERMEDIATE_VALUE = false; 917 int num = state.boundariesCrossed; 918 boolean isFinal = this.is$Final(); 919 typeShort_value = getPrimitiveCompilationUnit().typeShort(); 920 if (isFinal && num == state().boundariesCrossed) { 921 typeShort_computed = true; 922 } else { 923 } 924 state.INTERMEDIATE_VALUE |= intermediate; 925 926 return typeShort_value; 927 } 928 /** 929 * @apilevel internal 930 */ 931 protected boolean typeChar_computed = false; 932 /** 933 * @apilevel internal 934 */ 935 protected TypeDecl typeChar_value; 936 /** 937 * @apilevel internal 938 */ 939 private void typeChar_reset() { 940 typeChar_computed = false; 941 typeChar_value = null; 942 } 943 /** 944 * @attribute syn 945 * @aspect SpecialClasses 946 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:48 947 */ 948 @ASTNodeAnnotation.Attribute 949 public TypeDecl typeChar() { 950 ASTNode$State state = state(); 951 if (typeChar_computed) { 952 return typeChar_value; 953 } 954 boolean intermediate = state.INTERMEDIATE_VALUE; 955 state.INTERMEDIATE_VALUE = false; 956 int num = state.boundariesCrossed; 957 boolean isFinal = this.is$Final(); 958 typeChar_value = getPrimitiveCompilationUnit().typeChar(); 959 if (isFinal && num == state().boundariesCrossed) { 960 typeChar_computed = true; 961 } else { 962 } 963 state.INTERMEDIATE_VALUE |= intermediate; 964 965 return typeChar_value; 966 } 967 /** 968 * @apilevel internal 969 */ 970 protected boolean typeInt_computed = false; 971 /** 972 * @apilevel internal 973 */ 974 protected TypeDecl typeInt_value; 975 /** 976 * @apilevel internal 977 */ 978 private void typeInt_reset() { 979 typeInt_computed = false; 980 typeInt_value = null; 981 } 982 /** 983 * @attribute syn 984 * @aspect SpecialClasses 985 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:49 986 */ 987 @ASTNodeAnnotation.Attribute 988 public TypeDecl typeInt() { 989 ASTNode$State state = state(); 990 if (typeInt_computed) { 991 return typeInt_value; 992 } 993 boolean intermediate = state.INTERMEDIATE_VALUE; 994 state.INTERMEDIATE_VALUE = false; 995 int num = state.boundariesCrossed; 996 boolean isFinal = this.is$Final(); 997 typeInt_value = getPrimitiveCompilationUnit().typeInt(); 998 if (isFinal && num == state().boundariesCrossed) { 999 typeInt_computed = true; 1000 } else { 1001 } 1002 state.INTERMEDIATE_VALUE |= intermediate; 1003 1004 return typeInt_value; 1005 } 1006 /** 1007 * @apilevel internal 1008 */ 1009 protected boolean typeLong_computed = false; 1010 /** 1011 * @apilevel internal 1012 */ 1013 protected TypeDecl typeLong_value; 1014 /** 1015 * @apilevel internal 1016 */ 1017 private void typeLong_reset() { 1018 typeLong_computed = false; 1019 typeLong_value = null; 1020 } 1021 /** 1022 * @attribute syn 1023 * @aspect SpecialClasses 1024 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:50 1025 */ 1026 @ASTNodeAnnotation.Attribute 1027 public TypeDecl typeLong() { 1028 ASTNode$State state = state(); 1029 if (typeLong_computed) { 1030 return typeLong_value; 1031 } 1032 boolean intermediate = state.INTERMEDIATE_VALUE; 1033 state.INTERMEDIATE_VALUE = false; 1034 int num = state.boundariesCrossed; 1035 boolean isFinal = this.is$Final(); 1036 typeLong_value = getPrimitiveCompilationUnit().typeLong(); 1037 if (isFinal && num == state().boundariesCrossed) { 1038 typeLong_computed = true; 1039 } else { 1040 } 1041 state.INTERMEDIATE_VALUE |= intermediate; 1042 1043 return typeLong_value; 1044 } 1045 /** 1046 * @apilevel internal 1047 */ 1048 protected boolean typeFloat_computed = false; 1049 /** 1050 * @apilevel internal 1051 */ 1052 protected TypeDecl typeFloat_value; 1053 /** 1054 * @apilevel internal 1055 */ 1056 private void typeFloat_reset() { 1057 typeFloat_computed = false; 1058 typeFloat_value = null; 1059 } 1060 /** 1061 * @attribute syn 1062 * @aspect SpecialClasses 1063 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:51 1064 */ 1065 @ASTNodeAnnotation.Attribute 1066 public TypeDecl typeFloat() { 1067 ASTNode$State state = state(); 1068 if (typeFloat_computed) { 1069 return typeFloat_value; 1070 } 1071 boolean intermediate = state.INTERMEDIATE_VALUE; 1072 state.INTERMEDIATE_VALUE = false; 1073 int num = state.boundariesCrossed; 1074 boolean isFinal = this.is$Final(); 1075 typeFloat_value = getPrimitiveCompilationUnit().typeFloat(); 1076 if (isFinal && num == state().boundariesCrossed) { 1077 typeFloat_computed = true; 1078 } else { 1079 } 1080 state.INTERMEDIATE_VALUE |= intermediate; 1081 1082 return typeFloat_value; 1083 } 1084 /** 1085 * @apilevel internal 1086 */ 1087 protected boolean typeDouble_computed = false; 1088 /** 1089 * @apilevel internal 1090 */ 1091 protected TypeDecl typeDouble_value; 1092 /** 1093 * @apilevel internal 1094 */ 1095 private void typeDouble_reset() { 1096 typeDouble_computed = false; 1097 typeDouble_value = null; 1098 } 1099 /** 1100 * @attribute syn 1101 * @aspect SpecialClasses 1102 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:52 1103 */ 1104 @ASTNodeAnnotation.Attribute 1105 public TypeDecl typeDouble() { 1106 ASTNode$State state = state(); 1107 if (typeDouble_computed) { 1108 return typeDouble_value; 1109 } 1110 boolean intermediate = state.INTERMEDIATE_VALUE; 1111 state.INTERMEDIATE_VALUE = false; 1112 int num = state.boundariesCrossed; 1113 boolean isFinal = this.is$Final(); 1114 typeDouble_value = getPrimitiveCompilationUnit().typeDouble(); 1115 if (isFinal && num == state().boundariesCrossed) { 1116 typeDouble_computed = true; 1117 } else { 1118 } 1119 state.INTERMEDIATE_VALUE |= intermediate; 1120 1121 return typeDouble_value; 1122 } 1123 /** 1124 * @apilevel internal 1125 */ 1126 protected boolean typeString_computed = false; 1127 /** 1128 * @apilevel internal 1129 */ 1130 protected TypeDecl typeString_value; 1131 /** 1132 * @apilevel internal 1133 */ 1134 private void typeString_reset() { 1135 typeString_computed = false; 1136 typeString_value = null; 1137 } 1138 /** 1139 * @attribute syn 1140 * @aspect SpecialClasses 1141 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:53 1142 */ 1143 @ASTNodeAnnotation.Attribute 1144 public TypeDecl typeString() { 1145 ASTNode$State state = state(); 1146 if (typeString_computed) { 1147 return typeString_value; 1148 } 1149 boolean intermediate = state.INTERMEDIATE_VALUE; 1150 state.INTERMEDIATE_VALUE = false; 1151 int num = state.boundariesCrossed; 1152 boolean isFinal = this.is$Final(); 1153 typeString_value = lookupType("java.lang", "String"); 1154 if (isFinal && num == state().boundariesCrossed) { 1155 typeString_computed = true; 1156 } else { 1157 } 1158 state.INTERMEDIATE_VALUE |= intermediate; 1159 1160 return typeString_value; 1161 } 1162 /** 1163 * @apilevel internal 1164 */ 1165 protected boolean typeVoid_computed = false; 1166 /** 1167 * @apilevel internal 1168 */ 1169 protected TypeDecl typeVoid_value; 1170 /** 1171 * @apilevel internal 1172 */ 1173 private void typeVoid_reset() { 1174 typeVoid_computed = false; 1175 typeVoid_value = null; 1176 } 1177 /** 1178 * @attribute syn 1179 * @aspect SpecialClasses 1180 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:65 1181 */ 1182 @ASTNodeAnnotation.Attribute 1183 public TypeDecl typeVoid() { 1184 ASTNode$State state = state(); 1185 if (typeVoid_computed) { 1186 return typeVoid_value; 1187 } 1188 boolean intermediate = state.INTERMEDIATE_VALUE; 1189 state.INTERMEDIATE_VALUE = false; 1190 int num = state.boundariesCrossed; 1191 boolean isFinal = this.is$Final(); 1192 typeVoid_value = getPrimitiveCompilationUnit().typeVoid(); 1193 if (isFinal && num == state().boundariesCrossed) { 1194 typeVoid_computed = true; 1195 } else { 1196 } 1197 state.INTERMEDIATE_VALUE |= intermediate; 1198 1199 return typeVoid_value; 1200 } 1201 /** 1202 * @apilevel internal 1203 */ 1204 protected boolean typeNull_computed = false; 1205 /** 1206 * @apilevel internal 1207 */ 1208 protected TypeDecl typeNull_value; 1209 /** 1210 * @apilevel internal 1211 */ 1212 private void typeNull_reset() { 1213 typeNull_computed = false; 1214 typeNull_value = null; 1215 } 1216 /** 1217 * @attribute syn 1218 * @aspect SpecialClasses 1219 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:68 1220 */ 1221 @ASTNodeAnnotation.Attribute 1222 public TypeDecl typeNull() { 1223 ASTNode$State state = state(); 1224 if (typeNull_computed) { 1225 return typeNull_value; 1226 } 1227 boolean intermediate = state.INTERMEDIATE_VALUE; 1228 state.INTERMEDIATE_VALUE = false; 1229 int num = state.boundariesCrossed; 1230 boolean isFinal = this.is$Final(); 1231 typeNull_value = getPrimitiveCompilationUnit().typeNull(); 1232 if (isFinal && num == state().boundariesCrossed) { 1233 typeNull_computed = true; 1234 } else { 1235 } 1236 state.INTERMEDIATE_VALUE |= intermediate; 1237 1238 return typeNull_value; 1239 } 1240 /** 1241 * @apilevel internal 1242 */ 1243 protected boolean unknownType_computed = false; 1244 /** 1245 * @apilevel internal 1246 */ 1247 protected TypeDecl unknownType_value; 1248 /** 1249 * @apilevel internal 1250 */ 1251 private void unknownType_reset() { 1252 unknownType_computed = false; 1253 unknownType_value = null; 1254 } 1255 /** 1256 * @attribute syn 1257 * @aspect SpecialClasses 1258 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:71 1259 */ 1260 @ASTNodeAnnotation.Attribute 1261 public TypeDecl unknownType() { 1262 ASTNode$State state = state(); 1263 if (unknownType_computed) { 1264 return unknownType_value; 1265 } 1266 boolean intermediate = state.INTERMEDIATE_VALUE; 1267 state.INTERMEDIATE_VALUE = false; 1268 int num = state.boundariesCrossed; 1269 boolean isFinal = this.is$Final(); 1270 unknownType_value = getPrimitiveCompilationUnit().unknownType(); 1271 if (isFinal && num == state().boundariesCrossed) { 1272 unknownType_computed = true; 1273 } else { 1274 } 1275 state.INTERMEDIATE_VALUE |= intermediate; 1276 1277 return unknownType_value; 1278 } 1279 /** 1280 * @apilevel internal 1281 */ 1282 protected java.util.Map hasPackage_String_values; 1283 /** 1284 * @apilevel internal 1285 */ 1286 private void hasPackage_String_reset() { 1287 hasPackage_String_values = null; 1288 } 1289 /** 1290 * @attribute syn 1291 * @aspect LookupFullyQualifiedTypes 1292 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:102 1293 */ 1294 @ASTNodeAnnotation.Attribute 1295 public boolean hasPackage(String packageName) { 1296 Object _parameters = packageName; 1297 if (hasPackage_String_values == null) hasPackage_String_values = new org.jastadd.util.RobustMap(new java.util.HashMap()); 1298 ASTNode$State state = state(); 1299 if (hasPackage_String_values.containsKey(_parameters)) { 1300 return (Boolean) hasPackage_String_values.get(_parameters); 1301 } 1302 boolean intermediate = state.INTERMEDIATE_VALUE; 1303 state.INTERMEDIATE_VALUE = false; 1304 int num = state.boundariesCrossed; 1305 boolean isFinal = this.is$Final(); 1306 boolean hasPackage_String_value = isPackage(packageName); 1307 if (isFinal && num == state().boundariesCrossed) { 1308 hasPackage_String_values.put(_parameters, hasPackage_String_value); 1309 } else { 1310 } 1311 state.INTERMEDIATE_VALUE |= intermediate; 1312 1313 return hasPackage_String_value; 1314 } 1315 /** 1316 * @apilevel internal 1317 */ 1318 protected java.util.Map lookupType_String_String_values; 1319 /** 1320 * @apilevel internal 1321 */ 1322 private void lookupType_String_String_reset() { 1323 lookupType_String_String_values = null; 1324 } 1325 /** 1326 * Checks from-source compilation units for the given type. 1327 * If no matching compilation unit is found the library compliation units 1328 * will be searched. 1329 * @attribute syn 1330 * @aspect LookupFullyQualifiedTypes 1331 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:148 1332 */ 1333 @ASTNodeAnnotation.Attribute 1334 public TypeDecl lookupType(String packageName, String typeName) { 1335 java.util.List _parameters = new java.util.ArrayList(2); 1336 _parameters.add(packageName); 1337 _parameters.add(typeName); 1338 if (lookupType_String_String_values == null) lookupType_String_String_values = new org.jastadd.util.RobustMap(new java.util.HashMap()); 1339 ASTNode$State state = state(); 1340 if (lookupType_String_String_values.containsKey(_parameters)) { 1341 return (TypeDecl) lookupType_String_String_values.get(_parameters); 1342 } 1343 boolean intermediate = state.INTERMEDIATE_VALUE; 1344 state.INTERMEDIATE_VALUE = false; 1345 int num = state.boundariesCrossed; 1346 boolean isFinal = this.is$Final(); 1347 TypeDecl lookupType_String_String_value = lookupType_compute(packageName, typeName); 1348 if (isFinal && num == state().boundariesCrossed) { 1349 lookupType_String_String_values.put(_parameters, lookupType_String_String_value); 1350 } else { 1351 } 1352 state.INTERMEDIATE_VALUE |= intermediate; 1353 1354 return lookupType_String_String_value; 1355 } 1356 /** 1357 * @apilevel internal 1358 */ 1359 private TypeDecl lookupType_compute(String packageName, String typeName) { 1360 // Look for a matching source type. 1361 TypeDecl sourceType = lookupSourceType(packageName, typeName); 1362 if (!sourceType.isUnknown()) { 1363 return sourceType; 1364 } 1365 1366 // Look for a matching library type. 1367 return lookupLibraryType(packageName, typeName); 1368 } 1369 /** 1370 * @apilevel internal 1371 */ 1372 protected List getLibCompilationUnit_String_list; 1373 /** 1374 * @apilevel internal 1375 */ 1376 protected java.util.Map getLibCompilationUnit_String_values; 1377 /** 1378 * @apilevel internal 1379 */ 1380 private void getLibCompilationUnit_String_reset() { 1381 getLibCompilationUnit_String_values = null; 1382 getLibCompilationUnit_String_list = null; 1383 } 1384 /** 1385 * This attribute is used to cache library compilation units, by storing the compilation units in 1386 * a parameterized NTA. 1387 * @attribute syn 1388 * @aspect LookupFullyQualifiedTypes 1389 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:282 1390 */ 1391 @ASTNodeAnnotation.Attribute 1392 public CompilationUnit getLibCompilationUnit(String typeName) { 1393 Object _parameters = typeName; 1394 if (getLibCompilationUnit_String_values == null) getLibCompilationUnit_String_values = new org.jastadd.util.RobustMap(new java.util.HashMap()); 1395 ASTNode$State state = state(); 1396 if (getLibCompilationUnit_String_values.containsKey(_parameters)) { 1397 return (CompilationUnit) getLibCompilationUnit_String_values.get(_parameters); 1398 } 1399 boolean intermediate = state.INTERMEDIATE_VALUE; 1400 state.INTERMEDIATE_VALUE = false; 1401 int num = state.boundariesCrossed; 1402 boolean isFinal = this.is$Final(); 1403 CompilationUnit getLibCompilationUnit_String_value = getCompilationUnit(typeName); 1404 if (getLibCompilationUnit_String_list == null) { 1405 getLibCompilationUnit_String_list = new List(); 1406 getLibCompilationUnit_String_list.is$Final = true; 1407 getLibCompilationUnit_String_list.setParent(this); 1408 } 1409 getLibCompilationUnit_String_list.add(getLibCompilationUnit_String_value); 1410 if (getLibCompilationUnit_String_value != null) { 1411 getLibCompilationUnit_String_value = (CompilationUnit) getLibCompilationUnit_String_list.getChild(getLibCompilationUnit_String_list.numChildren-1); 1412 getLibCompilationUnit_String_value.is$Final = true; 1413 } 1414 if (true) { 1415 getLibCompilationUnit_String_values.put(_parameters, getLibCompilationUnit_String_value); 1416 } else { 1417 } 1418 state.INTERMEDIATE_VALUE |= intermediate; 1419 1420 return getLibCompilationUnit_String_value; 1421 } 1422 /** 1423 * @apilevel internal 1424 */ 1425 protected boolean emptyCompilationUnit_computed = false; 1426 /** 1427 * @apilevel internal 1428 */ 1429 protected CompilationUnit emptyCompilationUnit_value; 1430 /** 1431 * @apilevel internal 1432 */ 1433 private void emptyCompilationUnit_reset() { 1434 emptyCompilationUnit_computed = false; 1435 emptyCompilationUnit_value = null; 1436 } 1437 /** 1438 * @attribute syn 1439 * @aspect LookupFullyQualifiedTypes 1440 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:285 1441 */ 1442 @ASTNodeAnnotation.Attribute 1443 public CompilationUnit emptyCompilationUnit() { 1444 ASTNode$State state = state(); 1445 if (emptyCompilationUnit_computed) { 1446 return emptyCompilationUnit_value; 1447 } 1448 boolean intermediate = state.INTERMEDIATE_VALUE; 1449 state.INTERMEDIATE_VALUE = false; 1450 int num = state.boundariesCrossed; 1451 boolean isFinal = this.is$Final(); 1452 emptyCompilationUnit_value = new CompilationUnit(); 1453 emptyCompilationUnit_value.setParent(this); 1454 emptyCompilationUnit_value.is$Final = true; 1455 if (true) { 1456 emptyCompilationUnit_computed = true; 1457 } else { 1458 } 1459 state.INTERMEDIATE_VALUE |= intermediate; 1460 1461 return emptyCompilationUnit_value; 1462 } 1463 /** 1464 * @apilevel internal 1465 */ 1466 protected boolean getPrimitiveCompilationUnit_computed = false; 1467 /** 1468 * @apilevel internal 1469 */ 1470 protected PrimitiveCompilationUnit getPrimitiveCompilationUnit_value; 1471 /** 1472 * @apilevel internal 1473 */ 1474 private void getPrimitiveCompilationUnit_reset() { 1475 getPrimitiveCompilationUnit_computed = false; 1476 getPrimitiveCompilationUnit_value = null; 1477 } 1478 /** Creates a compilation unit with primitive types. 1479 * @attribute syn 1480 * @aspect PrimitiveTypes 1481 * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:140 1482 */ 1483 @ASTNodeAnnotation.Attribute 1484 public PrimitiveCompilationUnit getPrimitiveCompilationUnit() { 1485 ASTNode$State state = state(); 1486 if (getPrimitiveCompilationUnit_computed) { 1487 return getPrimitiveCompilationUnit_value; 1488 } 1489 boolean intermediate = state.INTERMEDIATE_VALUE; 1490 state.INTERMEDIATE_VALUE = false; 1491 int num = state.boundariesCrossed; 1492 boolean isFinal = this.is$Final(); 1493 getPrimitiveCompilationUnit_value = getPrimitiveCompilationUnit_compute(); 1494 getPrimitiveCompilationUnit_value.setParent(this); 1495 getPrimitiveCompilationUnit_value.is$Final = true; 1496 if (true) { 1497 getPrimitiveCompilationUnit_computed = true; 1498 } else { 1499 } 1500 state.INTERMEDIATE_VALUE |= intermediate; 1501 1502 return getPrimitiveCompilationUnit_value; 1503 } 1504 /** 1505 * @apilevel internal 1506 */ 1507 private PrimitiveCompilationUnit getPrimitiveCompilationUnit_compute() { 1508 PrimitiveCompilationUnit u = new PrimitiveCompilationUnit(); 1509 u.setPackageDecl(PRIMITIVE_PACKAGE_NAME); 1510 return u; 1511 } 1512 /** 1513 * @apilevel internal 1514 */ 1515 protected boolean unknownConstructor_computed = false; 1516 /** 1517 * @apilevel internal 1518 */ 1519 protected ConstructorDecl unknownConstructor_value; 1520 /** 1521 * @apilevel internal 1522 */ 1523 private void unknownConstructor_reset() { 1524 unknownConstructor_computed = false; 1525 unknownConstructor_value = null; 1526 } 1527 /** 1528 * @attribute syn 1529 * @aspect TypeAnalysis 1530 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:269 1531 */ 1532 @ASTNodeAnnotation.Attribute 1533 public ConstructorDecl unknownConstructor() { 1534 ASTNode$State state = state(); 1535 if (unknownConstructor_computed) { 1536 return unknownConstructor_value; 1537 } 1538 boolean intermediate = state.INTERMEDIATE_VALUE; 1539 state.INTERMEDIATE_VALUE = false; 1540 int num = state.boundariesCrossed; 1541 boolean isFinal = this.is$Final(); 1542 unknownConstructor_value = unknownConstructor_compute(); 1543 if (isFinal && num == state().boundariesCrossed) { 1544 unknownConstructor_computed = true; 1545 } else { 1546 } 1547 state.INTERMEDIATE_VALUE |= intermediate; 1548 1549 return unknownConstructor_value; 1550 } 1551 /** 1552 * @apilevel internal 1553 */ 1554 private ConstructorDecl unknownConstructor_compute() { 1555 return (ConstructorDecl) unknownType().constructors().iterator().next(); 1556 } 1557 /** 1558 * @apilevel internal 1559 */ 1560 protected boolean wildcards_computed = false; 1561 /** 1562 * @apilevel internal 1563 */ 1564 protected WildcardsCompilationUnit wildcards_value; 1565 /** 1566 * @apilevel internal 1567 */ 1568 private void wildcards_reset() { 1569 wildcards_computed = false; 1570 wildcards_value = null; 1571 } 1572 /** 1573 * @attribute syn 1574 * @aspect LookupParTypeDecl 1575 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1464 1576 */ 1577 @ASTNodeAnnotation.Attribute 1578 public WildcardsCompilationUnit wildcards() { 1579 ASTNode$State state = state(); 1580 if (wildcards_computed) { 1581 return wildcards_value; 1582 } 1583 boolean intermediate = state.INTERMEDIATE_VALUE; 1584 state.INTERMEDIATE_VALUE = false; 1585 int num = state.boundariesCrossed; 1586 boolean isFinal = this.is$Final(); 1587 wildcards_value = wildcards_compute(); 1588 wildcards_value.setParent(this); 1589 wildcards_value.is$Final = true; 1590 if (true) { 1591 wildcards_computed = true; 1592 } else { 1593 } 1594 state.INTERMEDIATE_VALUE |= intermediate; 1595 1596 return wildcards_value; 1597 } 1598 /** 1599 * @apilevel internal 1600 */ 1601 private WildcardsCompilationUnit wildcards_compute() { 1602 return new WildcardsCompilationUnit( 1603 "wildcards", 1604 new List(), 1605 new List() 1606 ); 1607 } 1608 /** 1609 * @declaredat /home/jesper/git/extendj/java4/frontend/AnonymousClasses.jrag:33 1610 * @apilevel internal 1611 */ 1612 public TypeDecl Define_superType(ASTNode caller, ASTNode child) { 1613 int childIndex = this.getIndexOfChild(caller); 1614 return null; 1615 } 1616 protected boolean canDefine_superType(ASTNode caller, ASTNode child) { 1617 return true; 1618 } 1619 /** 1620 * @declaredat /home/jesper/git/extendj/java4/frontend/AnonymousClasses.jrag:37 1621 * @apilevel internal 1622 */ 1623 public ConstructorDecl Define_constructorDecl(ASTNode caller, ASTNode child) { 1624 int childIndex = this.getIndexOfChild(caller); 1625 return unknownConstructor(); 1626 } 1627 protected boolean canDefine_constructorDecl(ASTNode caller, ASTNode child) { 1628 return true; 1629 } 1630 /** 1631 * @declaredat /home/jesper/git/extendj/java4/frontend/Arrays.jrag:42 1632 * @apilevel internal 1633 */ 1634 public TypeDecl Define_componentType(ASTNode caller, ASTNode child) { 1635 int childIndex = this.getIndexOfChild(caller); 1636 return unknownType(); 1637 } 1638 protected boolean canDefine_componentType(ASTNode caller, ASTNode child) { 1639 return true; 1640 } 1641 /** 1642 * @declaredat /home/jesper/git/extendj/java4/frontend/BranchTarget.jrag:250 1643 * @apilevel internal 1644 */ 1645 public LabeledStmt Define_lookupLabel(ASTNode caller, ASTNode child, String name) { 1646 int childIndex = this.getIndexOfChild(caller); 1647 return null; 1648 } 1649 protected boolean canDefine_lookupLabel(ASTNode caller, ASTNode child, String name) { 1650 return true; 1651 } 1652 /** 1653 * @declaredat /home/jesper/git/extendj/java4/frontend/DeclareBeforeUse.jrag:34 1654 * @apilevel internal 1655 */ 1656 public int Define_blockIndex(ASTNode caller, ASTNode child) { 1657 int childIndex = this.getIndexOfChild(caller); 1658 return -1; 1659 } 1660 protected boolean canDefine_blockIndex(ASTNode caller, ASTNode child) { 1661 return true; 1662 } 1663 /** 1664 * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:37 1665 * @apilevel internal 1666 */ 1667 public boolean Define_isDest(ASTNode caller, ASTNode child) { 1668 int childIndex = this.getIndexOfChild(caller); 1669 return false; 1670 } 1671 protected boolean canDefine_isDest(ASTNode caller, ASTNode child) { 1672 return true; 1673 } 1674 /** 1675 * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:47 1676 * @apilevel internal 1677 */ 1678 public boolean Define_isSource(ASTNode caller, ASTNode child) { 1679 int childIndex = this.getIndexOfChild(caller); 1680 return true; 1681 } 1682 protected boolean canDefine_isSource(ASTNode caller, ASTNode child) { 1683 return true; 1684 } 1685 /** 1686 * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:71 1687 * @apilevel internal 1688 */ 1689 public boolean Define_isIncOrDec(ASTNode caller, ASTNode child) { 1690 int childIndex = this.getIndexOfChild(caller); 1691 return false; 1692 } 1693 protected boolean canDefine_isIncOrDec(ASTNode caller, ASTNode child) { 1694 return true; 1695 } 1696 /** 1697 * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:255 1698 * @apilevel internal 1699 */ 1700 public boolean Define_isDAbefore(ASTNode caller, ASTNode child, Variable v) { 1701 int childIndex = this.getIndexOfChild(caller); 1702 return false; 1703 } 1704 protected boolean canDefine_isDAbefore(ASTNode caller, ASTNode child, Variable v) { 1705 return true; 1706 } 1707 /** 1708 * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:779 1709 * @apilevel internal 1710 */ 1711 public boolean Define_isDUbefore(ASTNode caller, ASTNode child, Variable v) { 1712 int childIndex = this.getIndexOfChild(caller); 1713 return true; 1714 } 1715 protected boolean canDefine_isDUbefore(ASTNode caller, ASTNode child, Variable v) { 1716 return true; 1717 } 1718 /** 1719 * @declaredat /home/jesper/git/extendj/java4/frontend/ExceptionHandling.jrag:41 1720 * @apilevel internal 1721 */ 1722 public TypeDecl Define_typeException(ASTNode caller, ASTNode child) { 1723 int childIndex = this.getIndexOfChild(caller); 1724 return lookupType("java.lang", "Exception"); 1725 } 1726 protected boolean canDefine_typeException(ASTNode caller, ASTNode child) { 1727 return true; 1728 } 1729 /** 1730 * @declaredat /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag:141 1731 * @apilevel internal 1732 */ 1733 public TypeDecl Define_typeRuntimeException(ASTNode caller, ASTNode child) { 1734 int childIndex = this.getIndexOfChild(caller); 1735 return lookupType("java.lang", "RuntimeException"); 1736 } 1737 protected boolean canDefine_typeRuntimeException(ASTNode caller, ASTNode child) { 1738 return true; 1739 } 1740 /** 1741 * @declaredat /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag:140 1742 * @apilevel internal 1743 */ 1744 public TypeDecl Define_typeError(ASTNode caller, ASTNode child) { 1745 int childIndex = this.getIndexOfChild(caller); 1746 return lookupType("java.lang", "Error"); 1747 } 1748 protected boolean canDefine_typeError(ASTNode caller, ASTNode child) { 1749 return true; 1750 } 1751 /** 1752 * @declaredat /home/jesper/git/extendj/java4/frontend/ExceptionHandling.jrag:47 1753 * @apilevel internal 1754 */ 1755 public TypeDecl Define_typeNullPointerException(ASTNode caller, ASTNode child) { 1756 int childIndex = this.getIndexOfChild(caller); 1757 return lookupType("java.lang", "NullPointerException"); 1758 } 1759 protected boolean canDefine_typeNullPointerException(ASTNode caller, ASTNode child) { 1760 return true; 1761 } 1762 /** 1763 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:93 1764 * @apilevel internal 1765 */ 1766 public TypeDecl Define_typeThrowable(ASTNode caller, ASTNode child) { 1767 int childIndex = this.getIndexOfChild(caller); 1768 return lookupType("java.lang", "Throwable"); 1769 } 1770 protected boolean canDefine_typeThrowable(ASTNode caller, ASTNode child) { 1771 return true; 1772 } 1773 /** 1774 * @declaredat /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag:113 1775 * @apilevel internal 1776 */ 1777 public boolean Define_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) { 1778 int childIndex = this.getIndexOfChild(caller); 1779 { 1780 throw new Error("Operation handlesException not supported"); 1781 } 1782 } 1783 protected boolean canDefine_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) { 1784 return true; 1785 } 1786 /** 1787 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:35 1788 * @apilevel internal 1789 */ 1790 public Collection Define_lookupConstructor(ASTNode caller, ASTNode child) { 1791 int childIndex = this.getIndexOfChild(caller); 1792 return Collections.EMPTY_LIST; 1793 } 1794 protected boolean canDefine_lookupConstructor(ASTNode caller, ASTNode child) { 1795 return true; 1796 } 1797 /** 1798 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:40 1799 * @apilevel internal 1800 */ 1801 public Collection Define_lookupSuperConstructor(ASTNode caller, ASTNode child) { 1802 int childIndex = this.getIndexOfChild(caller); 1803 return Collections.EMPTY_LIST; 1804 } 1805 protected boolean canDefine_lookupSuperConstructor(ASTNode caller, ASTNode child) { 1806 return true; 1807 } 1808 /** 1809 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:40 1810 * @apilevel internal 1811 */ 1812 public Expr Define_nestedScope(ASTNode caller, ASTNode child) { 1813 int childIndex = this.getIndexOfChild(caller); 1814 { throw new UnsupportedOperationException(); } 1815 } 1816 protected boolean canDefine_nestedScope(ASTNode caller, ASTNode child) { 1817 return true; 1818 } 1819 /** 1820 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:46 1821 * @apilevel internal 1822 */ 1823 public Collection Define_lookupMethod(ASTNode caller, ASTNode child, String name) { 1824 int childIndex = this.getIndexOfChild(caller); 1825 return Collections.EMPTY_LIST; 1826 } 1827 protected boolean canDefine_lookupMethod(ASTNode caller, ASTNode child, String name) { 1828 return true; 1829 } 1830 /** 1831 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1092 1832 * @apilevel internal 1833 */ 1834 public TypeDecl Define_typeObject(ASTNode caller, ASTNode child) { 1835 int childIndex = this.getIndexOfChild(caller); 1836 return typeObject(); 1837 } 1838 protected boolean canDefine_typeObject(ASTNode caller, ASTNode child) { 1839 return true; 1840 } 1841 /** 1842 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:162 1843 * @apilevel internal 1844 */ 1845 public TypeDecl Define_typeCloneable(ASTNode caller, ASTNode child) { 1846 int childIndex = this.getIndexOfChild(caller); 1847 return typeCloneable(); 1848 } 1849 protected boolean canDefine_typeCloneable(ASTNode caller, ASTNode child) { 1850 return true; 1851 } 1852 /** 1853 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:161 1854 * @apilevel internal 1855 */ 1856 public TypeDecl Define_typeSerializable(ASTNode caller, ASTNode child) { 1857 int childIndex = this.getIndexOfChild(caller); 1858 return typeSerializable(); 1859 } 1860 protected boolean canDefine_typeSerializable(ASTNode caller, ASTNode child) { 1861 return true; 1862 } 1863 /** 1864 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:74 1865 * @apilevel internal 1866 */ 1867 public TypeDecl Define_typeBoolean(ASTNode caller, ASTNode child) { 1868 int childIndex = this.getIndexOfChild(caller); 1869 return typeBoolean(); 1870 } 1871 protected boolean canDefine_typeBoolean(ASTNode caller, ASTNode child) { 1872 return true; 1873 } 1874 /** 1875 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:75 1876 * @apilevel internal 1877 */ 1878 public TypeDecl Define_typeByte(ASTNode caller, ASTNode child) { 1879 int childIndex = this.getIndexOfChild(caller); 1880 return typeByte(); 1881 } 1882 protected boolean canDefine_typeByte(ASTNode caller, ASTNode child) { 1883 return true; 1884 } 1885 /** 1886 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:76 1887 * @apilevel internal 1888 */ 1889 public TypeDecl Define_typeShort(ASTNode caller, ASTNode child) { 1890 int childIndex = this.getIndexOfChild(caller); 1891 return typeShort(); 1892 } 1893 protected boolean canDefine_typeShort(ASTNode caller, ASTNode child) { 1894 return true; 1895 } 1896 /** 1897 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:77 1898 * @apilevel internal 1899 */ 1900 public TypeDecl Define_typeChar(ASTNode caller, ASTNode child) { 1901 int childIndex = this.getIndexOfChild(caller); 1902 return typeChar(); 1903 } 1904 protected boolean canDefine_typeChar(ASTNode caller, ASTNode child) { 1905 return true; 1906 } 1907 /** 1908 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:86 1909 * @apilevel internal 1910 */ 1911 public TypeDecl Define_typeInt(ASTNode caller, ASTNode child) { 1912 int childIndex = this.getIndexOfChild(caller); 1913 return typeInt(); 1914 } 1915 protected boolean canDefine_typeInt(ASTNode caller, ASTNode child) { 1916 return true; 1917 } 1918 /** 1919 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:88 1920 * @apilevel internal 1921 */ 1922 public TypeDecl Define_typeLong(ASTNode caller, ASTNode child) { 1923 int childIndex = this.getIndexOfChild(caller); 1924 return typeLong(); 1925 } 1926 protected boolean canDefine_typeLong(ASTNode caller, ASTNode child) { 1927 return true; 1928 } 1929 /** 1930 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:80 1931 * @apilevel internal 1932 */ 1933 public TypeDecl Define_typeFloat(ASTNode caller, ASTNode child) { 1934 int childIndex = this.getIndexOfChild(caller); 1935 return typeFloat(); 1936 } 1937 protected boolean canDefine_typeFloat(ASTNode caller, ASTNode child) { 1938 return true; 1939 } 1940 /** 1941 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:81 1942 * @apilevel internal 1943 */ 1944 public TypeDecl Define_typeDouble(ASTNode caller, ASTNode child) { 1945 int childIndex = this.getIndexOfChild(caller); 1946 return typeDouble(); 1947 } 1948 protected boolean canDefine_typeDouble(ASTNode caller, ASTNode child) { 1949 return true; 1950 } 1951 /** 1952 * @declaredat /home/jesper/git/extendj/java5/frontend/Enums.jrag:466 1953 * @apilevel internal 1954 */ 1955 public TypeDecl Define_typeString(ASTNode caller, ASTNode child) { 1956 int childIndex = this.getIndexOfChild(caller); 1957 return typeString(); 1958 } 1959 protected boolean canDefine_typeString(ASTNode caller, ASTNode child) { 1960 return true; 1961 } 1962 /** 1963 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:83 1964 * @apilevel internal 1965 */ 1966 public TypeDecl Define_typeVoid(ASTNode caller, ASTNode child) { 1967 int childIndex = this.getIndexOfChild(caller); 1968 return typeVoid(); 1969 } 1970 protected boolean canDefine_typeVoid(ASTNode caller, ASTNode child) { 1971 return true; 1972 } 1973 /** 1974 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1141 1975 * @apilevel internal 1976 */ 1977 public TypeDecl Define_typeNull(ASTNode caller, ASTNode child) { 1978 int childIndex = this.getIndexOfChild(caller); 1979 return typeNull(); 1980 } 1981 protected boolean canDefine_typeNull(ASTNode caller, ASTNode child) { 1982 return true; 1983 } 1984 /** 1985 * @declaredat /home/jesper/git/extendj/java8/frontend/TypeCheck.jrag:31 1986 * @apilevel internal 1987 */ 1988 public TypeDecl Define_unknownType(ASTNode caller, ASTNode child) { 1989 int childIndex = this.getIndexOfChild(caller); 1990 return unknownType(); 1991 } 1992 protected boolean canDefine_unknownType(ASTNode caller, ASTNode child) { 1993 return true; 1994 } 1995 /** 1996 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:115 1997 * @apilevel internal 1998 */ 1999 public boolean Define_hasPackage(ASTNode caller, ASTNode child, String packageName) { 2000 int childIndex = this.getIndexOfChild(caller); 2001 return hasPackage(packageName); 2002 } 2003 protected boolean canDefine_hasPackage(ASTNode caller, ASTNode child, String packageName) { 2004 return true; 2005 } 2006 /** 2007 * @declaredat /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag:40 2008 * @apilevel internal 2009 */ 2010 public TypeDecl Define_lookupType(ASTNode caller, ASTNode child, String packageName, String typeName) { 2011 int childIndex = this.getIndexOfChild(caller); 2012 return lookupType(packageName, typeName); 2013 } 2014 protected boolean canDefine_lookupType(ASTNode caller, ASTNode child, String packageName, String typeName) { 2015 return true; 2016 } 2017 /** 2018 * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethods.jrag:197 2019 * @apilevel internal 2020 */ 2021 public SimpleSet Define_lookupType(ASTNode caller, ASTNode child, String name) { 2022 int childIndex = this.getIndexOfChild(caller); 2023 return SimpleSet.emptySet; 2024 } 2025 protected boolean canDefine_lookupType(ASTNode caller, ASTNode child, String name) { 2026 return true; 2027 } 2028 /** 2029 * @declaredat /home/jesper/git/extendj/java8/frontend/LookupVariable.jrag:30 2030 * @apilevel internal 2031 */ 2032 public SimpleSet Define_lookupVariable(ASTNode caller, ASTNode child, String name) { 2033 int childIndex = this.getIndexOfChild(caller); 2034 return SimpleSet.emptySet; 2035 } 2036 protected boolean canDefine_lookupVariable(ASTNode caller, ASTNode child, String name) { 2037 return true; 2038 } 2039 /** 2040 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:419 2041 * @apilevel internal 2042 */ 2043 public boolean Define_mayBePublic(ASTNode caller, ASTNode child) { 2044 int childIndex = this.getIndexOfChild(caller); 2045 return false; 2046 } 2047 protected boolean canDefine_mayBePublic(ASTNode caller, ASTNode child) { 2048 return true; 2049 } 2050 /** 2051 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:421 2052 * @apilevel internal 2053 */ 2054 public boolean Define_mayBeProtected(ASTNode caller, ASTNode child) { 2055 int childIndex = this.getIndexOfChild(caller); 2056 return false; 2057 } 2058 protected boolean canDefine_mayBeProtected(ASTNode caller, ASTNode child) { 2059 return true; 2060 } 2061 /** 2062 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:420 2063 * @apilevel internal 2064 */ 2065 public boolean Define_mayBePrivate(ASTNode caller, ASTNode child) { 2066 int childIndex = this.getIndexOfChild(caller); 2067 return false; 2068 } 2069 protected boolean canDefine_mayBePrivate(ASTNode caller, ASTNode child) { 2070 return true; 2071 } 2072 /** 2073 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:422 2074 * @apilevel internal 2075 */ 2076 public boolean Define_mayBeStatic(ASTNode caller, ASTNode child) { 2077 int childIndex = this.getIndexOfChild(caller); 2078 return false; 2079 } 2080 protected boolean canDefine_mayBeStatic(ASTNode caller, ASTNode child) { 2081 return true; 2082 } 2083 /** 2084 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:423 2085 * @apilevel internal 2086 */ 2087 public boolean Define_mayBeFinal(ASTNode caller, ASTNode child) { 2088 int childIndex = this.getIndexOfChild(caller); 2089 return false; 2090 } 2091 protected boolean canDefine_mayBeFinal(ASTNode caller, ASTNode child) { 2092 return true; 2093 } 2094 /** 2095 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:424 2096 * @apilevel internal 2097 */ 2098 public boolean Define_mayBeAbstract(ASTNode caller, ASTNode child) { 2099 int childIndex = this.getIndexOfChild(caller); 2100 return false; 2101 } 2102 protected boolean canDefine_mayBeAbstract(ASTNode caller, ASTNode child) { 2103 return true; 2104 } 2105 /** 2106 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:425 2107 * @apilevel internal 2108 */ 2109 public boolean Define_mayBeVolatile(ASTNode caller, ASTNode child) { 2110 int childIndex = this.getIndexOfChild(caller); 2111 return false; 2112 } 2113 protected boolean canDefine_mayBeVolatile(ASTNode caller, ASTNode child) { 2114 return true; 2115 } 2116 /** 2117 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:426 2118 * @apilevel internal 2119 */ 2120 public boolean Define_mayBeTransient(ASTNode caller, ASTNode child) { 2121 int childIndex = this.getIndexOfChild(caller); 2122 return false; 2123 } 2124 protected boolean canDefine_mayBeTransient(ASTNode caller, ASTNode child) { 2125 return true; 2126 } 2127 /** 2128 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:427 2129 * @apilevel internal 2130 */ 2131 public boolean Define_mayBeStrictfp(ASTNode caller, ASTNode child) { 2132 int childIndex = this.getIndexOfChild(caller); 2133 return false; 2134 } 2135 protected boolean canDefine_mayBeStrictfp(ASTNode caller, ASTNode child) { 2136 return true; 2137 } 2138 /** 2139 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:428 2140 * @apilevel internal 2141 */ 2142 public boolean Define_mayBeSynchronized(ASTNode caller, ASTNode child) { 2143 int childIndex = this.getIndexOfChild(caller); 2144 return false; 2145 } 2146 protected boolean canDefine_mayBeSynchronized(ASTNode caller, ASTNode child) { 2147 return true; 2148 } 2149 /** 2150 * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:429 2151 * @apilevel internal 2152 */ 2153 public boolean Define_mayBeNative(ASTNode caller, ASTNode child) { 2154 int childIndex = this.getIndexOfChild(caller); 2155 return false; 2156 } 2157 protected boolean canDefine_mayBeNative(ASTNode caller, ASTNode child) { 2158 return true; 2159 } 2160 /** 2161 * @declaredat /home/jesper/git/extendj/java4/frontend/NameCheck.jrag:310 2162 * @apilevel internal 2163 */ 2164 public ASTNode Define_enclosingBlock(ASTNode caller, ASTNode child) { 2165 int childIndex = this.getIndexOfChild(caller); 2166 return null; 2167 } 2168 protected boolean canDefine_enclosingBlock(ASTNode caller, ASTNode child) { 2169 return true; 2170 } 2171 /** 2172 * @declaredat /home/jesper/git/extendj/java8/frontend/NameCheck.jrag:30 2173 * @apilevel internal 2174 */ 2175 public VariableScope Define_outerScope(ASTNode caller, ASTNode child) { 2176 int childIndex = this.getIndexOfChild(caller); 2177 { 2178 throw new UnsupportedOperationException("outerScope() not defined"); 2179 } 2180 } 2181 protected boolean canDefine_outerScope(ASTNode caller, ASTNode child) { 2182 return true; 2183 } 2184 /** 2185 * @declaredat /home/jesper/git/extendj/java4/frontend/NameCheck.jrag:441 2186 * @apilevel internal 2187 */ 2188 public boolean Define_insideLoop(ASTNode caller, ASTNode child) { 2189 int childIndex = this.getIndexOfChild(caller); 2190 return false; 2191 } 2192 protected boolean canDefine_insideLoop(ASTNode caller, ASTNode child) { 2193 return true; 2194 } 2195 /** 2196 * @declaredat /home/jesper/git/extendj/java4/frontend/NameCheck.jrag:449 2197 * @apilevel internal 2198 */ 2199 public boolean Define_insideSwitch(ASTNode caller, ASTNode child) { 2200 int childIndex = this.getIndexOfChild(caller); 2201 return false; 2202 } 2203 protected boolean canDefine_insideSwitch(ASTNode caller, ASTNode child) { 2204 return true; 2205 } 2206 /** 2207 * @declaredat /home/jesper/git/extendj/java4/frontend/NameCheck.jrag:496 2208 * @apilevel internal 2209 */ 2210 public Case Define_bind(ASTNode caller, ASTNode child, Case c) { 2211 int childIndex = this.getIndexOfChild(caller); 2212 return null; 2213 } 2214 protected boolean canDefine_bind(ASTNode caller, ASTNode child, Case c) { 2215 return true; 2216 } 2217 /** 2218 * @declaredat /home/jesper/git/extendj/java4/frontend/Options.jadd:39 2219 * @apilevel internal 2220 */ 2221 public Program Define_program(ASTNode caller, ASTNode child) { 2222 int childIndex = this.getIndexOfChild(caller); 2223 return this; 2224 } 2225 protected boolean canDefine_program(ASTNode caller, ASTNode child) { 2226 return true; 2227 } 2228 /** 2229 * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36 2230 * @apilevel internal 2231 */ 2232 public NameType Define_nameType(ASTNode caller, ASTNode child) { 2233 int childIndex = this.getIndexOfChild(caller); 2234 return NameType.NOT_CLASSIFIED; 2235 } 2236 protected boolean canDefine_nameType(ASTNode caller, ASTNode child) { 2237 return true; 2238 } 2239 /** 2240 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:240 2241 * @apilevel internal 2242 */ 2243 public boolean Define_isAnonymous(ASTNode caller, ASTNode child) { 2244 int childIndex = this.getIndexOfChild(caller); 2245 return false; 2246 } 2247 protected boolean canDefine_isAnonymous(ASTNode caller, ASTNode child) { 2248 return true; 2249 } 2250 /** 2251 * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:334 2252 * @apilevel internal 2253 */ 2254 public Variable Define_unknownField(ASTNode caller, ASTNode child) { 2255 int childIndex = this.getIndexOfChild(caller); 2256 return unknownType().findSingleVariable("unknown"); 2257 } 2258 protected boolean canDefine_unknownField(ASTNode caller, ASTNode child) { 2259 return true; 2260 } 2261 /** 2262 * @declaredat /home/jesper/git/extendj/java8/frontend/MethodReference.jrag:30 2263 * @apilevel internal 2264 */ 2265 public MethodDecl Define_unknownMethod(ASTNode caller, ASTNode child) { 2266 int childIndex = this.getIndexOfChild(caller); 2267 { 2268 for (Iterator iter = unknownType().memberMethods("unknown").iterator(); iter.hasNext(); ) { 2269 MethodDecl m = (MethodDecl) iter.next(); 2270 return m; 2271 } 2272 throw new Error("Could not find method unknown in type Unknown"); 2273 } 2274 } 2275 protected boolean canDefine_unknownMethod(ASTNode caller, ASTNode child) { 2276 return true; 2277 } 2278 /** 2279 * @declaredat /home/jesper/git/extendj/java8/frontend/ConstructorReference.jrag:29 2280 * @apilevel internal 2281 */ 2282 public ConstructorDecl Define_unknownConstructor(ASTNode caller, ASTNode child) { 2283 int childIndex = this.getIndexOfChild(caller); 2284 return unknownConstructor(); 2285 } 2286 protected boolean canDefine_unknownConstructor(ASTNode caller, ASTNode child) { 2287 return true; 2288 } 2289 /** 2290 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:601 2291 * @apilevel internal 2292 */ 2293 public TypeDecl Define_declType(ASTNode caller, ASTNode child) { 2294 int i = this.getIndexOfChild(caller); 2295 return null; 2296 } 2297 protected boolean canDefine_declType(ASTNode caller, ASTNode child) { 2298 return true; 2299 } 2300 /** 2301 * @declaredat /home/jesper/git/extendj/java8/frontend/NameCheck.jrag:29 2302 * @apilevel internal 2303 */ 2304 public BodyDecl Define_enclosingBodyDecl(ASTNode caller, ASTNode child) { 2305 int childIndex = this.getIndexOfChild(caller); 2306 return null; 2307 } 2308 protected boolean canDefine_enclosingBodyDecl(ASTNode caller, ASTNode child) { 2309 return true; 2310 } 2311 /** 2312 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:577 2313 * @apilevel internal 2314 */ 2315 public boolean Define_isMemberType(ASTNode caller, ASTNode child) { 2316 int childIndex = this.getIndexOfChild(caller); 2317 return false; 2318 } 2319 protected boolean canDefine_isMemberType(ASTNode caller, ASTNode child) { 2320 return true; 2321 } 2322 /** 2323 * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:71 2324 * @apilevel internal 2325 */ 2326 public TypeDecl Define_hostType(ASTNode caller, ASTNode child) { 2327 int childIndex = this.getIndexOfChild(caller); 2328 return null; 2329 } 2330 protected boolean canDefine_hostType(ASTNode caller, ASTNode child) { 2331 return true; 2332 } 2333 /** 2334 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:420 2335 * @apilevel internal 2336 */ 2337 public TypeDecl Define_switchType(ASTNode caller, ASTNode child) { 2338 int childIndex = this.getIndexOfChild(caller); 2339 return unknownType(); 2340 } 2341 protected boolean canDefine_switchType(ASTNode caller, ASTNode child) { 2342 return true; 2343 } 2344 /** 2345 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:472 2346 * @apilevel internal 2347 */ 2348 public TypeDecl Define_returnType(ASTNode caller, ASTNode child) { 2349 int childIndex = this.getIndexOfChild(caller); 2350 return typeVoid(); 2351 } 2352 protected boolean canDefine_returnType(ASTNode caller, ASTNode child) { 2353 return true; 2354 } 2355 /** 2356 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:586 2357 * @apilevel internal 2358 */ 2359 public TypeDecl Define_enclosingInstance(ASTNode caller, ASTNode child) { 2360 int childIndex = this.getIndexOfChild(caller); 2361 return null; 2362 } 2363 protected boolean canDefine_enclosingInstance(ASTNode caller, ASTNode child) { 2364 return true; 2365 } 2366 /** 2367 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:32 2368 * @apilevel internal 2369 */ 2370 public String Define_methodHost(ASTNode caller, ASTNode child) { 2371 int childIndex = this.getIndexOfChild(caller); 2372 { 2373 throw new Error("Needs extra equation for methodHost()"); 2374 } 2375 } 2376 protected boolean canDefine_methodHost(ASTNode caller, ASTNode child) { 2377 return true; 2378 } 2379 /** 2380 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:165 2381 * @apilevel internal 2382 */ 2383 public boolean Define_inExplicitConstructorInvocation(ASTNode caller, ASTNode child) { 2384 int childIndex = this.getIndexOfChild(caller); 2385 return false; 2386 } 2387 protected boolean canDefine_inExplicitConstructorInvocation(ASTNode caller, ASTNode child) { 2388 return true; 2389 } 2390 /** 2391 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:173 2392 * @apilevel internal 2393 */ 2394 public TypeDecl Define_enclosingExplicitConstructorHostType(ASTNode caller, ASTNode child) { 2395 int childIndex = this.getIndexOfChild(caller); 2396 return null; 2397 } 2398 protected boolean canDefine_enclosingExplicitConstructorHostType(ASTNode caller, ASTNode child) { 2399 return true; 2400 } 2401 /** 2402 * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:182 2403 * @apilevel internal 2404 */ 2405 public boolean Define_inStaticContext(ASTNode caller, ASTNode child) { 2406 int childIndex = this.getIndexOfChild(caller); 2407 return false; 2408 } 2409 protected boolean canDefine_inStaticContext(ASTNode caller, ASTNode child) { 2410 return true; 2411 } 2412 /** 2413 * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:283 2414 * @apilevel internal 2415 */ 2416 public boolean Define_reportUnreachable(ASTNode caller, ASTNode child) { 2417 int childIndex = this.getIndexOfChild(caller); 2418 return true; 2419 } 2420 protected boolean canDefine_reportUnreachable(ASTNode caller, ASTNode child) { 2421 return true; 2422 } 2423 /** 2424 * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:44 2425 * @apilevel internal 2426 */ 2427 public boolean Define_isMethodParameter(ASTNode caller, ASTNode child) { 2428 int childIndex = this.getIndexOfChild(caller); 2429 return false; 2430 } 2431 protected boolean canDefine_isMethodParameter(ASTNode caller, ASTNode child) { 2432 return true; 2433 } 2434 /** 2435 * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:45 2436 * @apilevel internal 2437 */ 2438 public boolean Define_isConstructorParameter(ASTNode caller, ASTNode child) { 2439 int childIndex = this.getIndexOfChild(caller); 2440 return false; 2441 } 2442 protected boolean canDefine_isConstructorParameter(ASTNode caller, ASTNode child) { 2443 return true; 2444 } 2445 /** 2446 * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:46 2447 * @apilevel internal 2448 */ 2449 public boolean Define_isExceptionHandlerParameter(ASTNode caller, ASTNode child) { 2450 int childIndex = this.getIndexOfChild(caller); 2451 return false; 2452 } 2453 protected boolean canDefine_isExceptionHandlerParameter(ASTNode caller, ASTNode child) { 2454 return true; 2455 } 2456 /** 2457 * @declaredat /home/jesper/git/extendj/java4/backend/CodeGeneration.jrag:67 2458 * @apilevel internal 2459 */ 2460 public int Define_variableScopeEndLabel(ASTNode caller, ASTNode child, CodeGeneration gen) { 2461 int i = this.getIndexOfChild(caller); 2462 { 2463 throw new Error("variableScopeEndLabel not valid from here"); 2464 } 2465 } 2466 protected boolean canDefine_variableScopeEndLabel(ASTNode caller, ASTNode child, CodeGeneration gen) { 2467 return true; 2468 } 2469 /** 2470 * @declaredat /home/jesper/git/extendj/java4/backend/InnerClasses.jrag:93 2471 * @apilevel internal 2472 */ 2473 public TypeDecl Define_expectedType(ASTNode caller, ASTNode child) { 2474 int childIndex = this.getIndexOfChild(caller); 2475 return null; 2476 } 2477 protected boolean canDefine_expectedType(ASTNode caller, ASTNode child) { 2478 return true; 2479 } 2480 /** 2481 * @declaredat /home/jesper/git/extendj/java7/backend/MultiCatch.jrag:64 2482 * @apilevel internal 2483 */ 2484 public int Define_localNum(ASTNode caller, ASTNode child) { 2485 int index = this.getIndexOfChild(caller); 2486 return 0; 2487 } 2488 protected boolean canDefine_localNum(ASTNode caller, ASTNode child) { 2489 return true; 2490 } 2491 /** 2492 * @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:101 2493 * @apilevel internal 2494 */ 2495 public int Define_resultSaveLocalNum(ASTNode caller, ASTNode child) { 2496 int childIndex = this.getIndexOfChild(caller); 2497 { 2498 throw new Error("Unsupported operation resultSaveLocalNum"); 2499 } 2500 } 2501 protected boolean canDefine_resultSaveLocalNum(ASTNode caller, ASTNode child) { 2502 return true; 2503 } 2504 /** 2505 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:96 2506 * @apilevel internal 2507 */ 2508 public boolean Define_mayUseAnnotationTarget(ASTNode caller, ASTNode child, String name) { 2509 int childIndex = this.getIndexOfChild(caller); 2510 return false; 2511 } 2512 protected boolean canDefine_mayUseAnnotationTarget(ASTNode caller, ASTNode child, String name) { 2513 return true; 2514 } 2515 /** 2516 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:224 2517 * @apilevel internal 2518 */ 2519 public ElementValue Define_lookupElementTypeValue(ASTNode caller, ASTNode child, String name) { 2520 int childIndex = this.getIndexOfChild(caller); 2521 return null; 2522 } 2523 protected boolean canDefine_lookupElementTypeValue(ASTNode caller, ASTNode child, String name) { 2524 return true; 2525 } 2526 /** 2527 * @declaredat /home/jesper/git/extendj/java7/frontend/SuppressWarnings.jrag:38 2528 * @apilevel internal 2529 */ 2530 public boolean Define_withinSuppressWarnings(ASTNode caller, ASTNode child, String annot) { 2531 int childIndex = this.getIndexOfChild(caller); 2532 return false; 2533 } 2534 protected boolean canDefine_withinSuppressWarnings(ASTNode caller, ASTNode child, String annot) { 2535 return true; 2536 } 2537 /** 2538 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:449 2539 * @apilevel internal 2540 */ 2541 public boolean Define_withinDeprecatedAnnotation(ASTNode caller, ASTNode child) { 2542 int childIndex = this.getIndexOfChild(caller); 2543 return false; 2544 } 2545 protected boolean canDefine_withinDeprecatedAnnotation(ASTNode caller, ASTNode child) { 2546 return true; 2547 } 2548 /** 2549 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:504 2550 * @apilevel internal 2551 */ 2552 public Annotation Define_lookupAnnotation(ASTNode caller, ASTNode child, TypeDecl typeDecl) { 2553 int i = this.getIndexOfChild(caller); 2554 return null; 2555 } 2556 protected boolean canDefine_lookupAnnotation(ASTNode caller, ASTNode child, TypeDecl typeDecl) { 2557 return true; 2558 } 2559 /** 2560 * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:544 2561 * @apilevel internal 2562 */ 2563 public TypeDecl Define_enclosingAnnotationDecl(ASTNode caller, ASTNode child) { 2564 int childIndex = this.getIndexOfChild(caller); 2565 return unknownType(); 2566 } 2567 protected boolean canDefine_enclosingAnnotationDecl(ASTNode caller, ASTNode child) { 2568 return true; 2569 } 2570 /** 2571 * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag:58 2572 * @apilevel internal 2573 */ 2574 public TypeDecl Define_assignConvertedType(ASTNode caller, ASTNode child) { 2575 int childIndex = this.getIndexOfChild(caller); 2576 return typeNull(); 2577 } 2578 protected boolean canDefine_assignConvertedType(ASTNode caller, ASTNode child) { 2579 return true; 2580 } 2581 /** 2582 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:338 2583 * @apilevel internal 2584 */ 2585 public boolean Define_inExtendsOrImplements(ASTNode caller, ASTNode child) { 2586 int childIndex = this.getIndexOfChild(caller); 2587 return false; 2588 } 2589 protected boolean canDefine_inExtendsOrImplements(ASTNode caller, ASTNode child) { 2590 return true; 2591 } 2592 /** 2593 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1480 2594 * @apilevel internal 2595 */ 2596 public TypeDecl Define_typeWildcard(ASTNode caller, ASTNode child) { 2597 int childIndex = this.getIndexOfChild(caller); 2598 return wildcards().typeWildcard(); 2599 } 2600 protected boolean canDefine_typeWildcard(ASTNode caller, ASTNode child) { 2601 return true; 2602 } 2603 /** 2604 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1479 2605 * @apilevel internal 2606 */ 2607 public TypeDecl Define_lookupWildcardExtends(ASTNode caller, ASTNode child, TypeDecl typeDecl) { 2608 int childIndex = this.getIndexOfChild(caller); 2609 return wildcards().lookupWildcardExtends(typeDecl); 2610 } 2611 protected boolean canDefine_lookupWildcardExtends(ASTNode caller, ASTNode child, TypeDecl typeDecl) { 2612 return true; 2613 } 2614 /** 2615 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1478 2616 * @apilevel internal 2617 */ 2618 public TypeDecl Define_lookupWildcardSuper(ASTNode caller, ASTNode child, TypeDecl typeDecl) { 2619 int childIndex = this.getIndexOfChild(caller); 2620 return wildcards().lookupWildcardSuper(typeDecl); 2621 } 2622 protected boolean canDefine_lookupWildcardSuper(ASTNode caller, ASTNode child, TypeDecl typeDecl) { 2623 return true; 2624 } 2625 /** 2626 * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:167 2627 * @apilevel internal 2628 */ 2629 public LUBType Define_lookupLUBType(ASTNode caller, ASTNode child, Collection bounds) { 2630 int childIndex = this.getIndexOfChild(caller); 2631 return wildcards().lookupLUBType(bounds); 2632 } 2633 protected boolean canDefine_lookupLUBType(ASTNode caller, ASTNode child, Collection bounds) { 2634 return true; 2635 } 2636 /** 2637 * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1580 2638 * @apilevel internal 2639 */ 2640 public GLBType Define_lookupGLBType(ASTNode caller, ASTNode child, ArrayList bounds) { 2641 int childIndex = this.getIndexOfChild(caller); 2642 return wildcards().lookupGLBType(bounds); 2643 } 2644 protected boolean canDefine_lookupGLBType(ASTNode caller, ASTNode child, ArrayList bounds) { 2645 return true; 2646 } 2647 /** 2648 * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsParTypeDecl.jrag:71 2649 * @apilevel internal 2650 */ 2651 public TypeDecl Define_genericDecl(ASTNode caller, ASTNode child) { 2652 int childIndex = this.getIndexOfChild(caller); 2653 return null; 2654 } 2655 protected boolean canDefine_genericDecl(ASTNode caller, ASTNode child) { 2656 return true; 2657 } 2658 /** 2659 * @declaredat /home/jesper/git/extendj/java5/frontend/VariableArityParameters.jrag:48 2660 * @apilevel internal 2661 */ 2662 public boolean Define_variableArityValid(ASTNode caller, ASTNode child) { 2663 int childIndex = this.getIndexOfChild(caller); 2664 return false; 2665 } 2666 protected boolean canDefine_variableArityValid(ASTNode caller, ASTNode child) { 2667 return true; 2668 } 2669 /** 2670 * @declaredat /home/jesper/git/extendj/java7/frontend/Diamond.jrag:90 2671 * @apilevel internal 2672 */ 2673 public ClassInstanceExpr Define_getClassInstanceExpr(ASTNode caller, ASTNode child) { 2674 int i = this.getIndexOfChild(caller); 2675 return null; 2676 } 2677 protected boolean canDefine_getClassInstanceExpr(ASTNode caller, ASTNode child) { 2678 return true; 2679 } 2680 /** 2681 * @declaredat /home/jesper/git/extendj/java7/frontend/Diamond.jrag:401 2682 * @apilevel internal 2683 */ 2684 public boolean Define_isAnonymousDecl(ASTNode caller, ASTNode child) { 2685 int childIndex = this.getIndexOfChild(caller); 2686 return false; 2687 } 2688 protected boolean canDefine_isAnonymousDecl(ASTNode caller, ASTNode child) { 2689 return true; 2690 } 2691 /** 2692 * @declaredat /home/jesper/git/extendj/java7/frontend/Diamond.jrag:417 2693 * @apilevel internal 2694 */ 2695 public boolean Define_isExplicitGenericConstructorAccess(ASTNode caller, ASTNode child) { 2696 int i = this.getIndexOfChild(caller); 2697 return false; 2698 } 2699 protected boolean canDefine_isExplicitGenericConstructorAccess(ASTNode caller, ASTNode child) { 2700 return true; 2701 } 2702 /** 2703 * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:206 2704 * @apilevel internal 2705 */ 2706 public boolean Define_isCatchParam(ASTNode caller, ASTNode child) { 2707 int i = this.getIndexOfChild(caller); 2708 return false; 2709 } 2710 protected boolean canDefine_isCatchParam(ASTNode caller, ASTNode child) { 2711 return true; 2712 } 2713 /** 2714 * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:213 2715 * @apilevel internal 2716 */ 2717 public CatchClause Define_catchClause(ASTNode caller, ASTNode child) { 2718 int i = this.getIndexOfChild(caller); 2719 { 2720 throw new IllegalStateException("Could not find parent " + "catch clause"); 2721 } 2722 } 2723 protected boolean canDefine_catchClause(ASTNode caller, ASTNode child) { 2724 return true; 2725 } 2726 /** 2727 * @declaredat /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag:183 2728 * @apilevel internal 2729 */ 2730 public boolean Define_resourcePreviouslyDeclared(ASTNode caller, ASTNode child, String name) { 2731 int i = this.getIndexOfChild(caller); 2732 return false; 2733 } 2734 protected boolean canDefine_resourcePreviouslyDeclared(ASTNode caller, ASTNode child, String name) { 2735 return true; 2736 } 2737 /** 2738 * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:30 2739 * @apilevel internal 2740 */ 2741 public TypeDecl Define_targetType(ASTNode caller, ASTNode child) { 2742 int childIndex = this.getIndexOfChild(caller); 2743 return typeNull(); 2744 } 2745 protected boolean canDefine_targetType(ASTNode caller, ASTNode child) { 2746 return true; 2747 } 2748 /** 2749 * @apilevel internal 2750 */ 2751 public ASTNode rewriteTo() { 2752 return super.rewriteTo(); 2753 } 2754 }