src/share/classes/com/sun/tools/javac/jvm/ClassReader.java

changeset 1374
c002fdee76fd
parent 1313
873ddd9f4900
child 1384
bf54daa9dcd8
equal deleted inserted replaced
1373:4a1c57a1c410 1374:c002fdee76fd
53 import com.sun.tools.javac.util.*; 53 import com.sun.tools.javac.util.*;
54 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; 54 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
55 55
56 import static com.sun.tools.javac.code.Flags.*; 56 import static com.sun.tools.javac.code.Flags.*;
57 import static com.sun.tools.javac.code.Kinds.*; 57 import static com.sun.tools.javac.code.Kinds.*;
58 import static com.sun.tools.javac.code.TypeTags.*; 58 import static com.sun.tools.javac.code.TypeTag.CLASS;
59 import static com.sun.tools.javac.jvm.ClassFile.*; 59 import static com.sun.tools.javac.jvm.ClassFile.*;
60 import static com.sun.tools.javac.jvm.ClassFile.Version.*; 60 import static com.sun.tools.javac.jvm.ClassFile.Version.*;
61 61
62 import static com.sun.tools.javac.main.Option.*; 62 import static com.sun.tools.javac.main.Option.*;
63 63
1868 1868
1869 /** Enter type variables of this classtype and all enclosing ones in 1869 /** Enter type variables of this classtype and all enclosing ones in
1870 * `typevars'. 1870 * `typevars'.
1871 */ 1871 */
1872 protected void enterTypevars(Type t) { 1872 protected void enterTypevars(Type t) {
1873 if (t.getEnclosingType() != null && t.getEnclosingType().tag == CLASS) 1873 if (t.getEnclosingType() != null && t.getEnclosingType().hasTag(CLASS))
1874 enterTypevars(t.getEnclosingType()); 1874 enterTypevars(t.getEnclosingType());
1875 for (List<Type> xs = t.getTypeArguments(); xs.nonEmpty(); xs = xs.tail) 1875 for (List<Type> xs = t.getTypeArguments(); xs.nonEmpty(); xs = xs.tail)
1876 typevars.enter(xs.head.tsym); 1876 typevars.enter(xs.head.tsym);
1877 } 1877 }
1878 1878
1893 // allocate scope for members 1893 // allocate scope for members
1894 c.members_field = new Scope(c); 1894 c.members_field = new Scope(c);
1895 1895
1896 // prepare type variable table 1896 // prepare type variable table
1897 typevars = typevars.dup(currentOwner); 1897 typevars = typevars.dup(currentOwner);
1898 if (ct.getEnclosingType().tag == CLASS) 1898 if (ct.getEnclosingType().hasTag(CLASS))
1899 enterTypevars(ct.getEnclosingType()); 1899 enterTypevars(ct.getEnclosingType());
1900 1900
1901 // read flags, or skip if this is an inner class 1901 // read flags, or skip if this is an inner class
1902 long flags = adjustClassFlags(nextChar()); 1902 long flags = adjustClassFlags(nextChar());
1903 if (c.owner.kind == PCK) c.flags_field = flags; 1903 if (c.owner.kind == PCK) c.flags_field = flags;

mercurial