com.sun.java.util.jar.pack.Package.InnerClass Java Examples
The following examples show how to use
com.sun.java.util.jar.pack.Package.InnerClass.
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 jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** 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: PackageReader.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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 dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
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 jdk8u60 with GNU General Public License v2.0 | 6 votes |
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 TencentKona-8 with GNU General Public License v2.0 | 6 votes |
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: PackageWriter.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** 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 jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** 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 TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** 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 openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** 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: PackageReader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
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: PackageWriter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** 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: PackageReader.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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: PackageWriter.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** 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 #14
Source File: PackageReader.java From hottub with GNU General Public License v2.0 | 6 votes |
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 #15
Source File: PackageReader.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
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 #16
Source File: PackageReader.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
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 #17
Source File: PackageWriter.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** 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 #18
Source File: PackageReader.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
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 #19
Source File: PackageWriter.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** 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 #20
Source File: PackageReader.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
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 #21
Source File: PackageWriter.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** 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 #22
Source File: PackageReader.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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 #23
Source File: PackageWriter.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** 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 #24
Source File: PackageReader.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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 #25
Source File: PackageWriter.java From hottub with GNU General Public License v2.0 | 6 votes |
/** 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 #26
Source File: PackageWriter.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** 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 #27
Source File: ClassReader.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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 #28
Source File: ClassReader.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
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 #29
Source File: ClassWriter.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
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 #30
Source File: ClassWriter.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
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); } }