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

Print this page




 131     public final Type noClassDefFoundErrorType;
 132     public final Type noSuchFieldErrorType;
 133     public final Type assertionErrorType;
 134     public final Type cloneNotSupportedExceptionType;
 135     public final Type annotationType;
 136     public final TypeSymbol enumSym;
 137     public final Type listType;
 138     public final Type collectionsType;
 139     public final Type comparableType;
 140     public final Type arraysType;
 141     public final Type iterableType;
 142     public final Type iteratorType;
 143     public final Type annotationTargetType;
 144     public final Type overrideType;
 145     public final Type retentionType;
 146     public final Type deprecatedType;
 147     public final Type suppressWarningsType;
 148     public final Type inheritedType;
 149     public final Type proprietaryType;
 150     public final Type systemType;

 151 
 152     /** The symbol representing the length field of an array.
 153      */
 154     public final VarSymbol lengthVar;
 155 
 156     /** The null check operator. */
 157     public final OperatorSymbol nullcheck;
 158 
 159     /** The symbol representing the final finalize method on enums */
 160     public final MethodSymbol enumFinalFinalize;
 161 



 162     /** The predefined type that belongs to a tag.
 163      */
 164     public final Type[] typeOfTag = new Type[TypeTags.TypeTagCount];
 165 
 166     /** The name of the class that belongs to a basix type tag.
 167      */
 168     public final Name[] boxedName = new Name[TypeTags.TypeTagCount];
 169 
 170     /** A hashtable containing the encountered top-level and member classes,
 171      *  indexed by flat names. The table does not contain local classes.
 172      *  It should be updated from the outside to reflect classes defined
 173      *  by compiled source files.
 174      */
 175     public final Map<Name, ClassSymbol> classes = new HashMap<Name, ClassSymbol>();
 176 
 177     /** A hashtable containing the encountered packages.
 178      *  the table should be updated from outside to reflect packages defined
 179      *  by compiled source files.
 180      */
 181     public final Map<Name, PackageSymbol> packages = new HashMap<Name, PackageSymbol>();


 427             new MethodSymbol(PROTECTED|FINAL|HYPOTHETICAL,
 428                              names.finalize,
 429                              new MethodType(List.<Type>nil(), voidType,
 430                                             List.<Type>nil(), methodClass),
 431                              enumSym);
 432         listType = enterClass("java.util.List");
 433         collectionsType = enterClass("java.util.Collections");
 434         comparableType = enterClass("java.lang.Comparable");
 435         arraysType = enterClass("java.util.Arrays");
 436         iterableType = target.hasIterable()
 437             ? enterClass("java.lang.Iterable")
 438             : enterClass("java.util.Collection");
 439         iteratorType = enterClass("java.util.Iterator");
 440         annotationTargetType = enterClass("java.lang.annotation.Target");
 441         overrideType = enterClass("java.lang.Override");
 442         retentionType = enterClass("java.lang.annotation.Retention");
 443         deprecatedType = enterClass("java.lang.Deprecated");
 444         suppressWarningsType = enterClass("java.lang.SuppressWarnings");
 445         inheritedType = enterClass("java.lang.annotation.Inherited");
 446         systemType = enterClass("java.lang.System");






 447 
 448         synthesizeEmptyInterfaceIfMissing(cloneableType);
 449         synthesizeEmptyInterfaceIfMissing(serializableType);
 450         synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
 451         synthesizeBoxTypeIfMissing(doubleType);
 452         synthesizeBoxTypeIfMissing(floatType);
 453         synthesizeBoxTypeIfMissing(voidType);
 454 
 455         // Enter a synthetic class that is used to mark internal
 456         // proprietary classes in ct.sym.  This class does not have a
 457         // class file.
 458         ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation");
 459         this.proprietaryType = proprietaryType;
 460         ClassSymbol proprietarySymbol = (ClassSymbol)proprietaryType.tsym;
 461         proprietarySymbol.completer = null;
 462         proprietarySymbol.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE;
 463         proprietarySymbol.erasure_field = proprietaryType;
 464         proprietarySymbol.members_field = new Scope(proprietarySymbol);
 465         proprietaryType.typarams_field = List.nil();
 466         proprietaryType.allparams_field = List.nil();




 131     public final Type noClassDefFoundErrorType;
 132     public final Type noSuchFieldErrorType;
 133     public final Type assertionErrorType;
 134     public final Type cloneNotSupportedExceptionType;
 135     public final Type annotationType;
 136     public final TypeSymbol enumSym;
 137     public final Type listType;
 138     public final Type collectionsType;
 139     public final Type comparableType;
 140     public final Type arraysType;
 141     public final Type iterableType;
 142     public final Type iteratorType;
 143     public final Type annotationTargetType;
 144     public final Type overrideType;
 145     public final Type retentionType;
 146     public final Type deprecatedType;
 147     public final Type suppressWarningsType;
 148     public final Type inheritedType;
 149     public final Type proprietaryType;
 150     public final Type systemType;
 151     public final Type autoCloseableType;
 152 
 153     /** The symbol representing the length field of an array.
 154      */
 155     public final VarSymbol lengthVar;
 156 
 157     /** The null check operator. */
 158     public final OperatorSymbol nullcheck;
 159 
 160     /** The symbol representing the final finalize method on enums */
 161     public final MethodSymbol enumFinalFinalize;
 162 
 163     /** The symbol representing the close method on ARM AutoCloseable type */
 164     public final MethodSymbol autoCloseableClose;
 165 
 166     /** The predefined type that belongs to a tag.
 167      */
 168     public final Type[] typeOfTag = new Type[TypeTags.TypeTagCount];
 169 
 170     /** The name of the class that belongs to a basix type tag.
 171      */
 172     public final Name[] boxedName = new Name[TypeTags.TypeTagCount];
 173 
 174     /** A hashtable containing the encountered top-level and member classes,
 175      *  indexed by flat names. The table does not contain local classes.
 176      *  It should be updated from the outside to reflect classes defined
 177      *  by compiled source files.
 178      */
 179     public final Map<Name, ClassSymbol> classes = new HashMap<Name, ClassSymbol>();
 180 
 181     /** A hashtable containing the encountered packages.
 182      *  the table should be updated from outside to reflect packages defined
 183      *  by compiled source files.
 184      */
 185     public final Map<Name, PackageSymbol> packages = new HashMap<Name, PackageSymbol>();


 431             new MethodSymbol(PROTECTED|FINAL|HYPOTHETICAL,
 432                              names.finalize,
 433                              new MethodType(List.<Type>nil(), voidType,
 434                                             List.<Type>nil(), methodClass),
 435                              enumSym);
 436         listType = enterClass("java.util.List");
 437         collectionsType = enterClass("java.util.Collections");
 438         comparableType = enterClass("java.lang.Comparable");
 439         arraysType = enterClass("java.util.Arrays");
 440         iterableType = target.hasIterable()
 441             ? enterClass("java.lang.Iterable")
 442             : enterClass("java.util.Collection");
 443         iteratorType = enterClass("java.util.Iterator");
 444         annotationTargetType = enterClass("java.lang.annotation.Target");
 445         overrideType = enterClass("java.lang.Override");
 446         retentionType = enterClass("java.lang.annotation.Retention");
 447         deprecatedType = enterClass("java.lang.Deprecated");
 448         suppressWarningsType = enterClass("java.lang.SuppressWarnings");
 449         inheritedType = enterClass("java.lang.annotation.Inherited");
 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);
 457 
 458         synthesizeEmptyInterfaceIfMissing(cloneableType);
 459         synthesizeEmptyInterfaceIfMissing(serializableType);
 460         synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
 461         synthesizeBoxTypeIfMissing(doubleType);
 462         synthesizeBoxTypeIfMissing(floatType);
 463         synthesizeBoxTypeIfMissing(voidType);
 464 
 465         // Enter a synthetic class that is used to mark internal
 466         // proprietary classes in ct.sym.  This class does not have a
 467         // class file.
 468         ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation");
 469         this.proprietaryType = proprietaryType;
 470         ClassSymbol proprietarySymbol = (ClassSymbol)proprietaryType.tsym;
 471         proprietarySymbol.completer = null;
 472         proprietarySymbol.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE;
 473         proprietarySymbol.erasure_field = proprietaryType;
 474         proprietarySymbol.members_field = new Scope(proprietarySymbol);
 475         proprietaryType.typarams_field = List.nil();
 476         proprietaryType.allparams_field = List.nil();