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

The following examples show how to use com.sun.java.util.jar.pack.Package.Class#setInnerClasses() . 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: PackageReader.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 2
Source File: PackageReader.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 3
Source File: PackageReader.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 4
Source File: PackageReader.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 5
Source File: PackageReader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 6
Source File: PackageReader.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 7
Source File: PackageReader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 8
Source File: PackageReader.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 9
Source File: PackageReader.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 10
Source File: PackageReader.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 11
Source File: PackageReader.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 12
Source File: PackageReader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}
 
Example 13
Source File: PackageReader.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
void readLocalInnerClasses(Class cls) throws IOException {
    int nc = class_InnerClasses_N.getInt();
    List<InnerClass> localICs = new ArrayList<>(nc);
    for (int i = 0; i < nc; i++) {
        ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef();
        int        flags     =              class_InnerClasses_F.getInt();
        if (flags == 0) {
            // A zero flag means copy a global IC here.
            InnerClass ic = pkg.getGlobalInnerClass(thisClass);
            assert(ic != null);  // must be a valid global IC reference
            localICs.add(ic);
        } else {
            if (flags == ACC_IC_LONG_FORM)
                flags = 0;  // clear the marker bit
            ClassEntry outer = (ClassEntry) class_InnerClasses_outer_RCN.getRef();
            Utf8Entry name   = (Utf8Entry)  class_InnerClasses_name_RUN.getRef();
            localICs.add(new InnerClass(thisClass, outer, name, flags));
        }
    }
    cls.setInnerClasses(localICs);
    // cls.expandLocalICs may add more tuples to ics also,
    // or may even delete tuples.
    // We cannot do that now, because we do not know the
    // full contents of the local constant pool yet.
}