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

The following examples show how to use com.sun.java.util.jar.pack.Package.Class#getPackage() . 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_jdk with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 2
Source File: ClassReader.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 3
Source File: ClassReader.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 4
Source File: ClassReader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 5
Source File: ClassReader.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 6
Source File: ClassReader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 7
Source File: ClassReader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 8
Source File: ClassReader.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 9
Source File: ClassReader.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 10
Source File: ClassReader.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
 
Example 11
Source File: ClassWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 12
Source File: ClassWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 13
Source File: ClassWriter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 14
Source File: ClassWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 15
Source File: ClassWriter.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 16
Source File: ClassWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 17
Source File: ClassWriter.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 18
Source File: ClassWriter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 19
Source File: ClassWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}
 
Example 20
Source File: ClassWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
ClassWriter(Class cls, OutputStream out) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.out = new DataOutputStream(new BufferedOutputStream(out));
    this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
    this.cpIndex.flattenSigs = true;
    if (cls.hasBootstrapMethods()) {
        this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
                                               cls.getBootstrapMethodMap());
    }
    if (verbose > 1)
        Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
}