langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
changeset 6148 3a8158299c51
parent 6030 8cb12024680d
child 6594 d43f068fba19
equal deleted inserted replaced
6147:0074061d0efd 6148:3a8158299c51
   146     public final Type deprecatedType;
   146     public final Type deprecatedType;
   147     public final Type suppressWarningsType;
   147     public final Type suppressWarningsType;
   148     public final Type inheritedType;
   148     public final Type inheritedType;
   149     public final Type proprietaryType;
   149     public final Type proprietaryType;
   150     public final Type systemType;
   150     public final Type systemType;
       
   151     public final Type autoCloseableType;
   151 
   152 
   152     /** The symbol representing the length field of an array.
   153     /** The symbol representing the length field of an array.
   153      */
   154      */
   154     public final VarSymbol lengthVar;
   155     public final VarSymbol lengthVar;
   155 
   156 
   156     /** The null check operator. */
   157     /** The null check operator. */
   157     public final OperatorSymbol nullcheck;
   158     public final OperatorSymbol nullcheck;
   158 
   159 
   159     /** The symbol representing the final finalize method on enums */
   160     /** The symbol representing the final finalize method on enums */
   160     public final MethodSymbol enumFinalFinalize;
   161     public final MethodSymbol enumFinalFinalize;
       
   162 
       
   163     /** The symbol representing the close method on TWR AutoCloseable type */
       
   164     public final MethodSymbol autoCloseableClose;
   161 
   165 
   162     /** The predefined type that belongs to a tag.
   166     /** The predefined type that belongs to a tag.
   163      */
   167      */
   164     public final Type[] typeOfTag = new Type[TypeTags.TypeTagCount];
   168     public final Type[] typeOfTag = new Type[TypeTags.TypeTagCount];
   165 
   169 
   442         retentionType = enterClass("java.lang.annotation.Retention");
   446         retentionType = enterClass("java.lang.annotation.Retention");
   443         deprecatedType = enterClass("java.lang.Deprecated");
   447         deprecatedType = enterClass("java.lang.Deprecated");
   444         suppressWarningsType = enterClass("java.lang.SuppressWarnings");
   448         suppressWarningsType = enterClass("java.lang.SuppressWarnings");
   445         inheritedType = enterClass("java.lang.annotation.Inherited");
   449         inheritedType = enterClass("java.lang.annotation.Inherited");
   446         systemType = enterClass("java.lang.System");
   450         systemType = enterClass("java.lang.System");
       
   451         autoCloseableType = enterClass("java.lang.AutoCloseable");
       
   452         autoCloseableClose = new MethodSymbol(PUBLIC,
       
   453                              names.close,
       
   454                              new MethodType(List.<Type>nil(), voidType,
       
   455                                             List.of(exceptionType), methodClass),
       
   456                              autoCloseableType.tsym);
   447 
   457 
   448         synthesizeEmptyInterfaceIfMissing(cloneableType);
   458         synthesizeEmptyInterfaceIfMissing(cloneableType);
   449         synthesizeEmptyInterfaceIfMissing(serializableType);
   459         synthesizeEmptyInterfaceIfMissing(serializableType);
   450         synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
   460         synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
   451         synthesizeBoxTypeIfMissing(doubleType);
   461         synthesizeBoxTypeIfMissing(doubleType);