Java Code Examples for com.sun.java.util.jar.pack.Package.Class#getInnerClasses()

The following examples show how to use com.sun.java.util.jar.pack.Package.Class#getInnerClasses() . 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: PackageWriter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 2
Source File: PackageWriter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 3
Source File: PackageWriter.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 4
Source File: PackageWriter.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 5
Source File: PackageWriter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 6
Source File: PackageWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 7
Source File: PackageWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 8
Source File: PackageWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 9
Source File: PackageWriter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 10
Source File: PackageWriter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 11
Source File: PackageWriter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** If there are any extra InnerClasses entries to write which are
 *  not already implied by the global table, put them into a
 *  local attribute.  This is expected to be rare.
 */
void writeLocalInnerClasses(Class cls) throws IOException {
    List<InnerClass> localICs = cls.getInnerClasses();
    class_InnerClasses_N.putInt(localICs.size());
    for(InnerClass ic : localICs) {
        class_InnerClasses_RC.putRef(ic.thisClass);
        // Is it redundant with the global version?
        if (ic.equals(pkg.getGlobalInnerClass(ic.thisClass))) {
            // A zero flag means copy a global IC here.
            class_InnerClasses_F.putInt(0);
        } else {
            int flags = ic.flags;
            if (flags == 0)
                flags = ACC_IC_LONG_FORM;  // force it to be non-zero
            class_InnerClasses_F.putInt(flags);
            class_InnerClasses_outer_RCN.putRef(ic.outerClass);
            class_InnerClasses_name_RUN.putRef(ic.name);
        }
    }
}
 
Example 12
Source File: ClassWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 13
Source File: ClassWriter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 14
Source File: ClassWriter.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 15
Source File: ClassWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 16
Source File: ClassWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 17
Source File: ClassWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 18
Source File: ClassWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 19
Source File: ClassWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}
 
Example 20
Source File: ClassWriter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
void writeInnerClasses(Class cls) throws IOException {
    List<InnerClass> ics = cls.getInnerClasses();
    writeShort(ics.size());
    for (InnerClass ic : ics) {
        writeRef(ic.thisClass);
        writeRef(ic.outerClass);
        writeRef(ic.name);
        writeShort(ic.flags);
    }
}