--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java Thu Jul 15 16:31:56 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java Fri Jul 16 19:35:24 2010 -0700
@@ -148,6 +148,7 @@
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.
*/
@@ -159,6 +160,9 @@
/** 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];
@@ -444,6 +448,12 @@
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);