src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java

Print this page




 194     public final Type iterableType;
 195     public final Type iteratorType;
 196     public final Type annotationTargetType;
 197     public final Type overrideType;
 198     public final Type retentionType;
 199     public final Type deprecatedType;
 200     public final Type suppressWarningsType;
 201     public final Type supplierType;
 202     public final Type inheritedType;
 203     public final Type profileType;
 204     public final Type proprietaryType;
 205     public final Type systemType;
 206     public final Type autoCloseableType;
 207     public final Type trustMeType;
 208     public final Type lambdaMetafactory;
 209     public final Type stringConcatFactory;
 210     public final Type repeatableType;
 211     public final Type documentedType;
 212     public final Type elementTypeType;
 213     public final Type functionalInterfaceType;
 214     public final Type deriveValueType;
 215 
 216     /** The symbol representing the length field of an array.
 217      */
 218     public final VarSymbol lengthVar;
 219 
 220     /** The symbol representing the final finalize method on enums */
 221     public final MethodSymbol enumFinalFinalize;
 222 
 223     /** The symbol representing the close method on TWR AutoCloseable type */
 224     public final MethodSymbol autoCloseableClose;
 225 
 226     /** The predefined type that belongs to a tag.
 227      */
 228     public final Type[] typeOfTag = new Type[TypeTag.getTypeTagCount()];
 229 
 230     /** The name of the class that belongs to a basic type tag.
 231      */
 232     public final Name[] boxedName = new Name[TypeTag.getTypeTagCount()];
 233 
 234     /** A hashtable containing the encountered top-level and member classes,


 583         retentionType = enterClass("java.lang.annotation.Retention");
 584         deprecatedType = enterClass("java.lang.Deprecated");
 585         suppressWarningsType = enterClass("java.lang.SuppressWarnings");
 586         supplierType = enterClass("java.util.function.Supplier");
 587         inheritedType = enterClass("java.lang.annotation.Inherited");
 588         repeatableType = enterClass("java.lang.annotation.Repeatable");
 589         documentedType = enterClass("java.lang.annotation.Documented");
 590         elementTypeType = enterClass("java.lang.annotation.ElementType");
 591         systemType = enterClass("java.lang.System");
 592         autoCloseableType = enterClass("java.lang.AutoCloseable");
 593         autoCloseableClose = new MethodSymbol(PUBLIC,
 594                              names.close,
 595                              new MethodType(List.nil(), voidType,
 596                                             List.of(exceptionType), methodClass),
 597                              autoCloseableType.tsym);
 598         trustMeType = enterClass("java.lang.SafeVarargs");
 599         nativeHeaderType = enterClass("java.lang.annotation.Native");
 600         lambdaMetafactory = enterClass("java.lang.invoke.LambdaMetafactory");
 601         stringConcatFactory = enterClass("java.lang.invoke.StringConcatFactory");
 602         functionalInterfaceType = enterClass("java.lang.FunctionalInterface");
 603         deriveValueType = enterClass("jvm.internal.value.DeriveValueType");
 604 
 605         synthesizeEmptyInterfaceIfMissing(autoCloseableType);
 606         synthesizeEmptyInterfaceIfMissing(cloneableType);
 607         synthesizeEmptyInterfaceIfMissing(serializableType);
 608         synthesizeEmptyInterfaceIfMissing(lambdaMetafactory);
 609         synthesizeEmptyInterfaceIfMissing(serializedLambdaType);
 610         synthesizeEmptyInterfaceIfMissing(stringConcatFactory);
 611         synthesizeBoxTypeIfMissing(doubleType);
 612         synthesizeBoxTypeIfMissing(floatType);
 613         synthesizeBoxTypeIfMissing(voidType);
 614         synthesizeJavaLangValueClassIfMissing(valueClassType);
 615         synthesizeDeriveValueTypeIfMissing(deriveValueType);
 616 
 617         // Enter a synthetic class that is used to mark internal
 618         // proprietary classes in ct.sym.  This class does not have a
 619         // class file.
 620         proprietaryType = enterSyntheticAnnotation("sun.Proprietary+Annotation");
 621 
 622         // Enter a synthetic class that is used to provide profile info for
 623         // classes in ct.sym.  This class does not have a class file.
 624         profileType = enterSyntheticAnnotation("jdk.Profile+Annotation");
 625         MethodSymbol m = new MethodSymbol(PUBLIC | ABSTRACT, names.value, intType, profileType.tsym);
 626         profileType.tsym.members().enter(m);
 627 
 628         // Enter a class for arrays.
 629         // The class implements java.lang.Cloneable and java.io.Serializable.
 630         // It has a final length field and a clone method.
 631         ClassType arrayClassType = (ClassType)arrayClass.type;
 632         arrayClassType.supertype_field = objectType;
 633         arrayClassType.interfaces_field = List.of(cloneableType, serializableType);
 634         arrayClass.members_field = WriteableScope.create(arrayClass);
 635         lengthVar = new VarSymbol(




 194     public final Type iterableType;
 195     public final Type iteratorType;
 196     public final Type annotationTargetType;
 197     public final Type overrideType;
 198     public final Type retentionType;
 199     public final Type deprecatedType;
 200     public final Type suppressWarningsType;
 201     public final Type supplierType;
 202     public final Type inheritedType;
 203     public final Type profileType;
 204     public final Type proprietaryType;
 205     public final Type systemType;
 206     public final Type autoCloseableType;
 207     public final Type trustMeType;
 208     public final Type lambdaMetafactory;
 209     public final Type stringConcatFactory;
 210     public final Type repeatableType;
 211     public final Type documentedType;
 212     public final Type elementTypeType;
 213     public final Type functionalInterfaceType;
 214     public final Type valueCapableClass;
 215 
 216     /** The symbol representing the length field of an array.
 217      */
 218     public final VarSymbol lengthVar;
 219 
 220     /** The symbol representing the final finalize method on enums */
 221     public final MethodSymbol enumFinalFinalize;
 222 
 223     /** The symbol representing the close method on TWR AutoCloseable type */
 224     public final MethodSymbol autoCloseableClose;
 225 
 226     /** The predefined type that belongs to a tag.
 227      */
 228     public final Type[] typeOfTag = new Type[TypeTag.getTypeTagCount()];
 229 
 230     /** The name of the class that belongs to a basic type tag.
 231      */
 232     public final Name[] boxedName = new Name[TypeTag.getTypeTagCount()];
 233 
 234     /** A hashtable containing the encountered top-level and member classes,


 583         retentionType = enterClass("java.lang.annotation.Retention");
 584         deprecatedType = enterClass("java.lang.Deprecated");
 585         suppressWarningsType = enterClass("java.lang.SuppressWarnings");
 586         supplierType = enterClass("java.util.function.Supplier");
 587         inheritedType = enterClass("java.lang.annotation.Inherited");
 588         repeatableType = enterClass("java.lang.annotation.Repeatable");
 589         documentedType = enterClass("java.lang.annotation.Documented");
 590         elementTypeType = enterClass("java.lang.annotation.ElementType");
 591         systemType = enterClass("java.lang.System");
 592         autoCloseableType = enterClass("java.lang.AutoCloseable");
 593         autoCloseableClose = new MethodSymbol(PUBLIC,
 594                              names.close,
 595                              new MethodType(List.nil(), voidType,
 596                                             List.of(exceptionType), methodClass),
 597                              autoCloseableType.tsym);
 598         trustMeType = enterClass("java.lang.SafeVarargs");
 599         nativeHeaderType = enterClass("java.lang.annotation.Native");
 600         lambdaMetafactory = enterClass("java.lang.invoke.LambdaMetafactory");
 601         stringConcatFactory = enterClass("java.lang.invoke.StringConcatFactory");
 602         functionalInterfaceType = enterClass("java.lang.FunctionalInterface");
 603         valueCapableClass = enterClass("jvm.internal.value.ValueCapableClass");
 604 
 605         synthesizeEmptyInterfaceIfMissing(autoCloseableType);
 606         synthesizeEmptyInterfaceIfMissing(cloneableType);
 607         synthesizeEmptyInterfaceIfMissing(serializableType);
 608         synthesizeEmptyInterfaceIfMissing(lambdaMetafactory);
 609         synthesizeEmptyInterfaceIfMissing(serializedLambdaType);
 610         synthesizeEmptyInterfaceIfMissing(stringConcatFactory);
 611         synthesizeBoxTypeIfMissing(doubleType);
 612         synthesizeBoxTypeIfMissing(floatType);
 613         synthesizeBoxTypeIfMissing(voidType);
 614         synthesizeJavaLangValueClassIfMissing(valueClassType);
 615         synthesizeDeriveValueTypeIfMissing(valueCapableClass);
 616 
 617         // Enter a synthetic class that is used to mark internal
 618         // proprietary classes in ct.sym.  This class does not have a
 619         // class file.
 620         proprietaryType = enterSyntheticAnnotation("sun.Proprietary+Annotation");
 621 
 622         // Enter a synthetic class that is used to provide profile info for
 623         // classes in ct.sym.  This class does not have a class file.
 624         profileType = enterSyntheticAnnotation("jdk.Profile+Annotation");
 625         MethodSymbol m = new MethodSymbol(PUBLIC | ABSTRACT, names.value, intType, profileType.tsym);
 626         profileType.tsym.members().enter(m);
 627 
 628         // Enter a class for arrays.
 629         // The class implements java.lang.Cloneable and java.io.Serializable.
 630         // It has a final length field and a clone method.
 631         ClassType arrayClassType = (ClassType)arrayClass.type;
 632         arrayClassType.supertype_field = objectType;
 633         arrayClassType.interfaces_field = List.of(cloneableType, serializableType);
 634         arrayClass.members_field = WriteableScope.create(arrayClass);
 635         lengthVar = new VarSymbol(