com.sun.java.util.jar.pack.ConstantPool.Utf8Entry Java Examples

The following examples show how to use com.sun.java.util.jar.pack.ConstantPool.Utf8Entry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClassReader.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
void readInnerClasses(Class cls) throws IOException {
    int nc = readUnsignedShort();
    ArrayList<InnerClass> ics = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        InnerClass ic =
            new InnerClass(readClassRef(),
                           readClassRefOrNull(),
                           (Utf8Entry)readRefOrNull(CONSTANT_Utf8),
                           readUnsignedShort());
        ics.add(ic);
    }
    cls.innerClasses = ics;  // set directly; do not use setInnerClasses.
    // (Later, ics may be transferred to the pkg.)
}
 
Example #2
Source File: ClassReader.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #3
Source File: Package.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void transformSourceFile(boolean minimize) {
    // Replace "obvious" SourceFile by null.
    Attribute olda = getAttribute(attrSourceFileSpecial);
    if (olda == null)
        return;  // no SourceFile attr.
    String obvious = getObviousSourceFile();
    List<Entry> ref = new ArrayList<>(1);
    olda.visitRefs(this, VRM_PACKAGE, ref);
    Utf8Entry sfName = (Utf8Entry) ref.get(0);
    Attribute a = olda;
    if (sfName == null) {
        if (minimize) {
            // A pair of zero bytes.  Cannot use predef. layout.
            a = Attribute.find(ATTR_CONTEXT_CLASS, "SourceFile", "H");
            a = a.addContent(new byte[2]);
        } else {
            // Expand null attribute to the obvious string.
            byte[] bytes = new byte[2];
            sfName = getRefString(obvious);
            Object f = null;
            f = Fixups.addRefWithBytes(f, bytes, sfName);
            a = attrSourceFileSpecial.addContent(bytes, f);
        }
    } else if (obvious.equals(sfName.stringValue())) {
        if (minimize) {
            // Replace by an all-zero attribute.
            a = attrSourceFileSpecial.addContent(new byte[2]);
        } else {
            assert(false);
        }
    }
    if (a != olda) {
        if (verbose > 2)
            Utils.log.fine("recoding obvious SourceFile="+obvious);
        List<Attribute> newAttrs = new ArrayList<>(getAttributes());
        int where = newAttrs.indexOf(olda);
        newAttrs.set(where, a);
        setAttributes(newAttrs);
    }
}
 
Example #4
Source File: ClassReader.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #5
Source File: ClassReader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #6
Source File: Package.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void transformSourceFile(boolean minimize) {
    // Replace "obvious" SourceFile by null.
    Attribute olda = getAttribute(attrSourceFileSpecial);
    if (olda == null)
        return;  // no SourceFile attr.
    String obvious = getObviousSourceFile();
    List<Entry> ref = new ArrayList<>(1);
    olda.visitRefs(this, VRM_PACKAGE, ref);
    Utf8Entry sfName = (Utf8Entry) ref.get(0);
    Attribute a = olda;
    if (sfName == null) {
        if (minimize) {
            // A pair of zero bytes.  Cannot use predef. layout.
            a = Attribute.find(ATTR_CONTEXT_CLASS, "SourceFile", "H");
            a = a.addContent(new byte[2]);
        } else {
            // Expand null attribute to the obvious string.
            byte[] bytes = new byte[2];
            sfName = getRefString(obvious);
            Object f = null;
            f = Fixups.addRefWithBytes(f, bytes, sfName);
            a = attrSourceFileSpecial.addContent(bytes, f);
        }
    } else if (obvious.equals(sfName.stringValue())) {
        if (minimize) {
            // Replace by an all-zero attribute.
            a = attrSourceFileSpecial.addContent(new byte[2]);
        } else {
            assert(false);
        }
    }
    if (a != olda) {
        if (verbose > 2)
            Utils.log.fine("recoding obvious SourceFile="+obvious);
        List<Attribute> newAttrs = new ArrayList<>(getAttributes());
        int where = newAttrs.indexOf(olda);
        newAttrs.set(where, a);
        setAttributes(newAttrs);
    }
}
 
Example #7
Source File: Package.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #8
Source File: ClassReader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #9
Source File: Package.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void transformSourceFile(boolean minimize) {
    // Replace "obvious" SourceFile by null.
    Attribute olda = getAttribute(attrSourceFileSpecial);
    if (olda == null)
        return;  // no SourceFile attr.
    String obvious = getObviousSourceFile();
    List<Entry> ref = new ArrayList<>(1);
    olda.visitRefs(this, VRM_PACKAGE, ref);
    Utf8Entry sfName = (Utf8Entry) ref.get(0);
    Attribute a = olda;
    if (sfName == null) {
        if (minimize) {
            // A pair of zero bytes.  Cannot use predef. layout.
            a = Attribute.find(ATTR_CONTEXT_CLASS, "SourceFile", "H");
            a = a.addContent(new byte[2]);
        } else {
            // Expand null attribute to the obvious string.
            byte[] bytes = new byte[2];
            sfName = getRefString(obvious);
            Object f = null;
            f = Fixups.addRefWithBytes(f, bytes, sfName);
            a = attrSourceFileSpecial.addContent(bytes, f);
        }
    } else if (obvious.equals(sfName.stringValue())) {
        if (minimize) {
            // Replace by an all-zero attribute.
            a = attrSourceFileSpecial.addContent(new byte[2]);
        } else {
            assert(false);
        }
    }
    if (a != olda) {
        if (verbose > 2)
            Utils.log.fine("recoding obvious SourceFile="+obvious);
        List<Attribute> newAttrs = new ArrayList<>(getAttributes());
        int where = newAttrs.indexOf(olda);
        newAttrs.set(where, a);
        setAttributes(newAttrs);
    }
}
 
Example #10
Source File: Package.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #11
Source File: ClassReader.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #12
Source File: Package.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #13
Source File: Package.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void transformSourceFile(boolean minimize) {
    // Replace "obvious" SourceFile by null.
    Attribute olda = getAttribute(attrSourceFileSpecial);
    if (olda == null)
        return;  // no SourceFile attr.
    String obvious = getObviousSourceFile();
    List<Entry> ref = new ArrayList<>(1);
    olda.visitRefs(this, VRM_PACKAGE, ref);
    Utf8Entry sfName = (Utf8Entry) ref.get(0);
    Attribute a = olda;
    if (sfName == null) {
        if (minimize) {
            // A pair of zero bytes.  Cannot use predef. layout.
            a = Attribute.find(ATTR_CONTEXT_CLASS, "SourceFile", "H");
            a = a.addContent(new byte[2]);
        } else {
            // Expand null attribute to the obvious string.
            byte[] bytes = new byte[2];
            sfName = getRefString(obvious);
            Object f = null;
            f = Fixups.addRefWithBytes(f, bytes, sfName);
            a = attrSourceFileSpecial.addContent(bytes, f);
        }
    } else if (obvious.equals(sfName.stringValue())) {
        if (minimize) {
            // Replace by an all-zero attribute.
            a = attrSourceFileSpecial.addContent(new byte[2]);
        } else {
            assert(false);
        }
    }
    if (a != olda) {
        if (verbose > 2)
            Utils.log.fine("recoding obvious SourceFile="+obvious);
        List<Attribute> newAttrs = new ArrayList<>(getAttributes());
        int where = newAttrs.indexOf(olda);
        newAttrs.set(where, a);
        setAttributes(newAttrs);
    }
}
 
Example #14
Source File: ClassReader.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #15
Source File: Package.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #16
Source File: Package.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void transformSourceFile(boolean minimize) {
    // Replace "obvious" SourceFile by null.
    Attribute olda = getAttribute(attrSourceFileSpecial);
    if (olda == null)
        return;  // no SourceFile attr.
    String obvious = getObviousSourceFile();
    List<Entry> ref = new ArrayList<>(1);
    olda.visitRefs(this, VRM_PACKAGE, ref);
    Utf8Entry sfName = (Utf8Entry) ref.get(0);
    Attribute a = olda;
    if (sfName == null) {
        if (minimize) {
            // A pair of zero bytes.  Cannot use predef. layout.
            a = Attribute.find(ATTR_CONTEXT_CLASS, "SourceFile", "H");
            a = a.addContent(new byte[2]);
        } else {
            // Expand null attribute to the obvious string.
            byte[] bytes = new byte[2];
            sfName = getRefString(obvious);
            Object f = null;
            f = Fixups.addRefWithBytes(f, bytes, sfName);
            a = attrSourceFileSpecial.addContent(bytes, f);
        }
    } else if (obvious.equals(sfName.stringValue())) {
        if (minimize) {
            // Replace by an all-zero attribute.
            a = attrSourceFileSpecial.addContent(new byte[2]);
        } else {
            assert(false);
        }
    }
    if (a != olda) {
        if (verbose > 2)
            Utils.log.fine("recoding obvious SourceFile="+obvious);
        List<Attribute> newAttrs = new ArrayList<>(getAttributes());
        int where = newAttrs.indexOf(olda);
        newAttrs.set(where, a);
        setAttributes(newAttrs);
    }
}
 
Example #17
Source File: ClassReader.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void readInnerClasses(Class cls) throws IOException {
    int nc = readUnsignedShort();
    ArrayList<InnerClass> ics = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        InnerClass ic =
            new InnerClass(readClassRef(),
                           readClassRefOrNull(),
                           (Utf8Entry)readRefOrNull(CONSTANT_Utf8),
                           readUnsignedShort());
        ics.add(ic);
    }
    cls.innerClasses = ics;  // set directly; do not use setInnerClasses.
    // (Later, ics may be transferred to the pkg.)
}
 
Example #18
Source File: Package.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void transformSourceFile(boolean minimize) {
    // Replace "obvious" SourceFile by null.
    Attribute olda = getAttribute(attrSourceFileSpecial);
    if (olda == null)
        return;  // no SourceFile attr.
    String obvious = getObviousSourceFile();
    List<Entry> ref = new ArrayList<>(1);
    olda.visitRefs(this, VRM_PACKAGE, ref);
    Utf8Entry sfName = (Utf8Entry) ref.get(0);
    Attribute a = olda;
    if (sfName == null) {
        if (minimize) {
            // A pair of zero bytes.  Cannot use predef. layout.
            a = Attribute.find(ATTR_CONTEXT_CLASS, "SourceFile", "H");
            a = a.addContent(new byte[2]);
        } else {
            // Expand null attribute to the obvious string.
            byte[] bytes = new byte[2];
            sfName = getRefString(obvious);
            Object f = null;
            f = Fixups.addRefWithBytes(f, bytes, sfName);
            a = attrSourceFileSpecial.addContent(bytes, f);
        }
    } else if (obvious.equals(sfName.stringValue())) {
        if (minimize) {
            // Replace by an all-zero attribute.
            a = attrSourceFileSpecial.addContent(new byte[2]);
        } else {
            assert(false);
        }
    }
    if (a != olda) {
        if (verbose > 2)
            Utils.log.fine("recoding obvious SourceFile="+obvious);
        List<Attribute> newAttrs = new ArrayList<>(getAttributes());
        int where = newAttrs.indexOf(olda);
        newAttrs.set(where, a);
        setAttributes(newAttrs);
    }
}
 
Example #19
Source File: Package.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #20
Source File: ClassReader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #21
Source File: ClassReader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void readInnerClasses(Class cls) throws IOException {
    int nc = readUnsignedShort();
    ArrayList<InnerClass> ics = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        InnerClass ic =
            new InnerClass(readClassRef(),
                           readClassRefOrNull(),
                           (Utf8Entry)readRefOrNull(CONSTANT_Utf8),
                           readUnsignedShort());
        ics.add(ic);
    }
    cls.innerClasses = ics;  // set directly; do not use setInnerClasses.
    // (Later, ics may be transferred to the pkg.)
}
 
Example #22
Source File: Package.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void transformSourceFile(boolean minimize) {
    // Replace "obvious" SourceFile by null.
    Attribute olda = getAttribute(attrSourceFileSpecial);
    if (olda == null)
        return;  // no SourceFile attr.
    String obvious = getObviousSourceFile();
    List<Entry> ref = new ArrayList<>(1);
    olda.visitRefs(this, VRM_PACKAGE, ref);
    Utf8Entry sfName = (Utf8Entry) ref.get(0);
    Attribute a = olda;
    if (sfName == null) {
        if (minimize) {
            // A pair of zero bytes.  Cannot use predef. layout.
            a = Attribute.find(ATTR_CONTEXT_CLASS, "SourceFile", "H");
            a = a.addContent(new byte[2]);
        } else {
            // Expand null attribute to the obvious string.
            byte[] bytes = new byte[2];
            sfName = getRefString(obvious);
            Object f = null;
            f = Fixups.addRefWithBytes(f, bytes, sfName);
            a = attrSourceFileSpecial.addContent(bytes, f);
        }
    } else if (obvious.equals(sfName.stringValue())) {
        if (minimize) {
            // Replace by an all-zero attribute.
            a = attrSourceFileSpecial.addContent(new byte[2]);
        } else {
            assert(false);
        }
    }
    if (a != olda) {
        if (verbose > 2)
            Utils.log.fine("recoding obvious SourceFile="+obvious);
        List<Attribute> newAttrs = new ArrayList<>(getAttributes());
        int where = newAttrs.indexOf(olda);
        newAttrs.set(where, a);
        setAttributes(newAttrs);
    }
}
 
Example #23
Source File: Package.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #24
Source File: Package.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #25
Source File: ClassReader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #26
Source File: ClassReader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
void readInnerClasses(Class cls) throws IOException {
    int nc = readUnsignedShort();
    ArrayList<InnerClass> ics = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        InnerClass ic =
            new InnerClass(readClassRef(),
                           readClassRefOrNull(),
                           (Utf8Entry)readRefOrNull(CONSTANT_Utf8),
                           readUnsignedShort());
        ics.add(ic);
    }
    cls.innerClasses = ics;  // set directly; do not use setInnerClasses.
    // (Later, ics may be transferred to the pkg.)
}
 
Example #27
Source File: Package.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #28
Source File: Package.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
InnerClass(ClassEntry thisClass, ClassEntry outerClass,
           Utf8Entry name, int flags) {
    this.thisClass = thisClass;
    this.outerClass = outerClass;
    this.name = name;
    this.flags = flags;
    this.predictable = computePredictable();
}
 
Example #29
Source File: ClassReader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
void readMember(boolean doMethod) throws IOException {
    int    mflags = readUnsignedShort();
    Utf8Entry       mname = readUtf8Ref();
    SignatureEntry  mtype = readSignatureRef();
    DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
    Class.Member m;
    if (!doMethod)
        m = cls.new Field(mflags, descr);
    else
        m = cls.new Method(mflags, descr);
    readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                   m);
}
 
Example #30
Source File: ClassReader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
void readInnerClasses(Class cls) throws IOException {
    int nc = readUnsignedShort();
    ArrayList<InnerClass> ics = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        InnerClass ic =
            new InnerClass(readClassRef(),
                           readClassRefOrNull(),
                           (Utf8Entry)readRefOrNull(CONSTANT_Utf8),
                           readUnsignedShort());
        ics.add(ic);
    }
    cls.innerClasses = ics;  // set directly; do not use setInnerClasses.
    // (Later, ics may be transferred to the pkg.)
}