langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
changeset 42828 cce89649f958
parent 42827 36468b5fa7f4
child 43131 7769e4891d5e
equal deleted inserted replaced
42827:36468b5fa7f4 42828:cce89649f958
   307                     sym.flags_field |= PUBLIC;
   307                     sym.flags_field |= PUBLIC;
   308                     ((ClassType) sym.type).supertype_field = objectType;
   308                     ((ClassType) sym.type).supertype_field = objectType;
   309                     MethodSymbol boxMethod =
   309                     MethodSymbol boxMethod =
   310                         new MethodSymbol(PUBLIC | STATIC, names.valueOf,
   310                         new MethodSymbol(PUBLIC | STATIC, names.valueOf,
   311                                          new MethodType(List.of(type), sym.type,
   311                                          new MethodType(List.of(type), sym.type,
   312                                 List.<Type>nil(), methodClass),
   312                                 List.nil(), methodClass),
   313                             sym);
   313                             sym);
   314                     sym.members().enter(boxMethod);
   314                     sym.members().enter(boxMethod);
   315                     MethodSymbol unboxMethod =
   315                     MethodSymbol unboxMethod =
   316                         new MethodSymbol(PUBLIC,
   316                         new MethodSymbol(PUBLIC,
   317                             type.tsym.name.append(names.Value), // x.intValue()
   317                             type.tsym.name.append(names.Value), // x.intValue()
   318                             new MethodType(List.<Type>nil(), type,
   318                             new MethodType(List.nil(), type,
   319                                 List.<Type>nil(), methodClass),
   319                                 List.nil(), methodClass),
   320                             sym);
   320                             sym);
   321                     sym.members().enter(unboxMethod);
   321                     sym.members().enter(unboxMethod);
   322                 }
   322                 }
   323             }
   323             }
   324 
   324 
   512         classLoaderType = enterClass("java.lang.ClassLoader");
   512         classLoaderType = enterClass("java.lang.ClassLoader");
   513         enumSym = enterClass(java_base, names.java_lang_Enum);
   513         enumSym = enterClass(java_base, names.java_lang_Enum);
   514         enumFinalFinalize =
   514         enumFinalFinalize =
   515             new MethodSymbol(PROTECTED|FINAL|HYPOTHETICAL,
   515             new MethodSymbol(PROTECTED|FINAL|HYPOTHETICAL,
   516                              names.finalize,
   516                              names.finalize,
   517                              new MethodType(List.<Type>nil(), voidType,
   517                              new MethodType(List.nil(), voidType,
   518                                             List.<Type>nil(), methodClass),
   518                                             List.nil(), methodClass),
   519                              enumSym);
   519                              enumSym);
   520         listType = enterClass("java.util.List");
   520         listType = enterClass("java.util.List");
   521         collectionsType = enterClass("java.util.Collections");
   521         collectionsType = enterClass("java.util.Collections");
   522         comparableType = enterClass("java.lang.Comparable");
   522         comparableType = enterClass("java.lang.Comparable");
   523         comparatorType = enterClass("java.util.Comparator");
   523         comparatorType = enterClass("java.util.Comparator");
   536         elementTypeType = enterClass("java.lang.annotation.ElementType");
   536         elementTypeType = enterClass("java.lang.annotation.ElementType");
   537         systemType = enterClass("java.lang.System");
   537         systemType = enterClass("java.lang.System");
   538         autoCloseableType = enterClass("java.lang.AutoCloseable");
   538         autoCloseableType = enterClass("java.lang.AutoCloseable");
   539         autoCloseableClose = new MethodSymbol(PUBLIC,
   539         autoCloseableClose = new MethodSymbol(PUBLIC,
   540                              names.close,
   540                              names.close,
   541                              new MethodType(List.<Type>nil(), voidType,
   541                              new MethodType(List.nil(), voidType,
   542                                             List.of(exceptionType), methodClass),
   542                                             List.of(exceptionType), methodClass),
   543                              autoCloseableType.tsym);
   543                              autoCloseableType.tsym);
   544         trustMeType = enterClass("java.lang.SafeVarargs");
   544         trustMeType = enterClass("java.lang.SafeVarargs");
   545         nativeHeaderType = enterClass("java.lang.annotation.Native");
   545         nativeHeaderType = enterClass("java.lang.annotation.Native");
   546         lambdaMetafactory = enterClass("java.lang.invoke.LambdaMetafactory");
   546         lambdaMetafactory = enterClass("java.lang.invoke.LambdaMetafactory");
   582             arrayClass);
   582             arrayClass);
   583         arrayClass.members().enter(lengthVar);
   583         arrayClass.members().enter(lengthVar);
   584         arrayCloneMethod = new MethodSymbol(
   584         arrayCloneMethod = new MethodSymbol(
   585             PUBLIC,
   585             PUBLIC,
   586             names.clone,
   586             names.clone,
   587             new MethodType(List.<Type>nil(), objectType,
   587             new MethodType(List.nil(), objectType,
   588                            List.<Type>nil(), methodClass),
   588                            List.nil(), methodClass),
   589             arrayClass);
   589             arrayClass);
   590         arrayClass.members().enter(arrayCloneMethod);
   590         arrayClass.members().enter(arrayCloneMethod);
   591 
   591 
   592         if (java_base != noModule)
   592         if (java_base != noModule)
   593             java_base.completer = moduleCompleter::complete; //bootstrap issues
   593             java_base.completer = moduleCompleter::complete; //bootstrap issues