src/share/classes/com/sun/tools/javac/code/Symtab.java

changeset 1603
6118072811e5
parent 1587
f1f605f85850
parent 1570
f91144b7da75
child 1620
3806171b52d8
equal deleted inserted replaced
1602:dabb36173c63 1603:6118072811e5
155 public final Type overrideType; 155 public final Type overrideType;
156 public final Type retentionType; 156 public final Type retentionType;
157 public final Type deprecatedType; 157 public final Type deprecatedType;
158 public final Type suppressWarningsType; 158 public final Type suppressWarningsType;
159 public final Type inheritedType; 159 public final Type inheritedType;
160 public final Type profileType;
160 public final Type proprietaryType; 161 public final Type proprietaryType;
161 public final Type systemType; 162 public final Type systemType;
162 public final Type autoCloseableType; 163 public final Type autoCloseableType;
163 public final Type trustMeType; 164 public final Type trustMeType;
164 public final Type lambdaMetafactory; 165 public final Type lambdaMetafactory;
357 } 358 }
358 } 359 }
359 }; 360 };
360 } 361 }
361 362
363 }
364
365 // Enter a synthetic class that is used to mark classes in ct.sym.
366 // This class does not have a class file.
367 private Type enterSyntheticAnnotation(String name) {
368 ClassType type = (ClassType)enterClass(name);
369 ClassSymbol sym = (ClassSymbol)type.tsym;
370 sym.completer = null;
371 sym.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE;
372 sym.erasure_field = type;
373 sym.members_field = new Scope(sym);
374 type.typarams_field = List.nil();
375 type.allparams_field = List.nil();
376 type.supertype_field = annotationType;
377 type.interfaces_field = List.nil();
378 return type;
362 } 379 }
363 380
364 /** Constructor; enters all predefined identifiers and operators 381 /** Constructor; enters all predefined identifiers and operators
365 * into symbol table. 382 * into symbol table.
366 */ 383 */
522 synthesizeBoxTypeIfMissing(voidType); 539 synthesizeBoxTypeIfMissing(voidType);
523 540
524 // Enter a synthetic class that is used to mark internal 541 // Enter a synthetic class that is used to mark internal
525 // proprietary classes in ct.sym. This class does not have a 542 // proprietary classes in ct.sym. This class does not have a
526 // class file. 543 // class file.
527 ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation"); 544 proprietaryType = enterSyntheticAnnotation("sun.Proprietary+Annotation");
528 this.proprietaryType = proprietaryType; 545
529 ClassSymbol proprietarySymbol = (ClassSymbol)proprietaryType.tsym; 546 // Enter a synthetic class that is used to provide profile info for
530 proprietarySymbol.completer = null; 547 // classes in ct.sym. This class does not have a class file.
531 proprietarySymbol.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE; 548 profileType = enterSyntheticAnnotation("jdk.Profile+Annotation");
532 proprietarySymbol.erasure_field = proprietaryType; 549 MethodSymbol m = new MethodSymbol(PUBLIC | ABSTRACT, names.value, intType, profileType.tsym);
533 proprietarySymbol.members_field = new Scope(proprietarySymbol); 550 profileType.tsym.members().enter(m);
534 proprietaryType.typarams_field = List.nil();
535 proprietaryType.allparams_field = List.nil();
536 proprietaryType.supertype_field = annotationType;
537 proprietaryType.interfaces_field = List.nil();
538 551
539 // Enter a class for arrays. 552 // Enter a class for arrays.
540 // The class implements java.lang.Cloneable and java.io.Serializable. 553 // The class implements java.lang.Cloneable and java.io.Serializable.
541 // It has a final length field and a clone method. 554 // It has a final length field and a clone method.
542 ClassType arrayClassType = (ClassType)arrayClass.type; 555 ClassType arrayClassType = (ClassType)arrayClass.type;

mercurial