langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
changeset 25445 603f0c93d5c9
parent 25443 9187d77f2c64
equal deleted inserted replaced
25444:27045478cf23 25445:603f0c93d5c9
   365                     try {
   365                     try {
   366                         completer.complete(sym);
   366                         completer.complete(sym);
   367                     } catch (CompletionFailure e) {
   367                     } catch (CompletionFailure e) {
   368                         sym.flags_field |= PUBLIC;
   368                         sym.flags_field |= PUBLIC;
   369                         ((ClassType) sym.type).supertype_field = objectType;
   369                         ((ClassType) sym.type).supertype_field = objectType;
   370                         Name n = target.boxWithConstructors() ? names.init : names.valueOf;
       
   371                         MethodSymbol boxMethod =
   370                         MethodSymbol boxMethod =
   372                             new MethodSymbol(PUBLIC | STATIC,
   371                             new MethodSymbol(PUBLIC | STATIC, names.valueOf,
   373                                 n,
   372                                              new MethodType(List.of(type), sym.type,
   374                                 new MethodType(List.of(type), sym.type,
       
   375                                     List.<Type>nil(), methodClass),
   373                                     List.<Type>nil(), methodClass),
   376                                 sym);
   374                                 sym);
   377                         sym.members().enter(boxMethod);
   375                         sym.members().enter(boxMethod);
   378                         MethodSymbol unboxMethod =
   376                         MethodSymbol unboxMethod =
   379                             new MethodSymbol(PUBLIC,
   377                             new MethodSymbol(PUBLIC,
   526         listType = enterClass("java.util.List");
   524         listType = enterClass("java.util.List");
   527         collectionsType = enterClass("java.util.Collections");
   525         collectionsType = enterClass("java.util.Collections");
   528         comparableType = enterClass("java.lang.Comparable");
   526         comparableType = enterClass("java.lang.Comparable");
   529         comparatorType = enterClass("java.util.Comparator");
   527         comparatorType = enterClass("java.util.Comparator");
   530         arraysType = enterClass("java.util.Arrays");
   528         arraysType = enterClass("java.util.Arrays");
   531         iterableType = target.hasIterable()
   529         iterableType = enterClass("java.lang.Iterable");
   532             ? enterClass("java.lang.Iterable")
       
   533             : enterClass("java.util.Collection");
       
   534         iteratorType = enterClass("java.util.Iterator");
   530         iteratorType = enterClass("java.util.Iterator");
   535         annotationTargetType = enterClass("java.lang.annotation.Target");
   531         annotationTargetType = enterClass("java.lang.annotation.Target");
   536         overrideType = enterClass("java.lang.Override");
   532         overrideType = enterClass("java.lang.Override");
   537         retentionType = enterClass("java.lang.annotation.Retention");
   533         retentionType = enterClass("java.lang.annotation.Retention");
   538         deprecatedType = enterClass("java.lang.Deprecated");
   534         deprecatedType = enterClass("java.lang.Deprecated");