Package eu.bibl.banalysis.asm

Examples of eu.bibl.banalysis.asm.ClassNode


            ClassReader cr = new ClassReader(getClassNodeBytes(cn));
            ClassWriter cw = new ClassWriter(cr, 0);
            RemappingClassAdapter rca = new RemappingClassAdapter(cw, mapper);
            cr.accept(rca, ClassReader.EXPAND_FRAMES);
            cr = new ClassReader(cw.toByteArray());
            cn  = new ClassNode();
            cr.accept(cn, 0);
            refactored.put(oldName, cn);
        }
        for (Map.Entry<String, ClassNode> factor : refactored.entrySet()) {
            getContainer().relocate(factor.getKey(), factor.getValue());
View Full Code Here


      while (entries.hasMoreElements()) {
        JarEntry entry = entries.nextElement();
        byte[] bytes = read(jarFile.getInputStream(entry));
        if (entry.getName().endsWith(".class")) {
          ClassReader cr = new ClassReader(bytes);
          ClassNode cn = new ClassNode();
          cr.accept(cn, 0);
          contents.addClass(cn);
        } else {
          if (bytes.length > 0) {
            if (bytes.length >= 4) {
              byte ch1 = bytes[0];
              byte ch2 = bytes[1];
              byte ch3 = bytes[2];
              byte ch4 = bytes[3];
              int magic = ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
              if (magic == 0xCAFEBABE) {
                ClassReader cr = new ClassReader(bytes);
                ClassNode cn = new ClassNode();
                cr.accept(cn, 0);
                contents.addClass(cn);
              } else {
                addResource(connection.getJarFileURL(), entry.getName(), bytes);
                resCount++;
View Full Code Here

TOP

Related Classes of eu.bibl.banalysis.asm.ClassNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.