src/share/classes/com/sun/tools/javac/code/Symtab.java
Print this page
@@ -146,10 +146,11 @@
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,10 +158,13 @@
public final OperatorSymbol nullcheck;
/** The symbol representing the final finalize method on enums */
public final MethodSymbol enumFinalFinalize;
+ /** The symbol representing the close method on ARM 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,10 +446,16 @@
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);