src/share/classes/com/sun/tools/javac/code/Symtab.java
Print this page
*** 146,155 ****
--- 146,156 ----
public final Type deprecatedType;
public final Type suppressWarningsType;
public final Type inheritedType;
public final Type proprietaryType;
public final Type systemType;
+ public final Type autoCloseableType;
/** The symbol representing the length field of an array.
*/
public final VarSymbol lengthVar;
*** 157,166 ****
--- 158,170 ----
public final OperatorSymbol nullcheck;
/** The symbol representing the final finalize method on enums */
public final MethodSymbol enumFinalFinalize;
+ /** The symbol representing the close method on TWR AutoCloseable type */
+ public final MethodSymbol autoCloseableClose;
+
/** The predefined type that belongs to a tag.
*/
public final Type[] typeOfTag = new Type[TypeTags.TypeTagCount];
/** The name of the class that belongs to a basix type tag.
*** 442,451 ****
--- 446,461 ----
retentionType = enterClass("java.lang.annotation.Retention");
deprecatedType = enterClass("java.lang.Deprecated");
suppressWarningsType = enterClass("java.lang.SuppressWarnings");
inheritedType = enterClass("java.lang.annotation.Inherited");
systemType = enterClass("java.lang.System");
+ autoCloseableType = enterClass("java.lang.AutoCloseable");
+ autoCloseableClose = new MethodSymbol(PUBLIC,
+ names.close,
+ new MethodType(List.<Type>nil(), voidType,
+ List.of(exceptionType), methodClass),
+ autoCloseableType.tsym);
synthesizeEmptyInterfaceIfMissing(cloneableType);
synthesizeEmptyInterfaceIfMissing(serializableType);
synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
synthesizeBoxTypeIfMissing(doubleType);