Package javassist.bytecode

Examples of javassist.bytecode.CodeIterator.insertGapAt()


/* 377 */       if (pos >= 0) {
/* 378 */         int mref = iterator.u16bitAt(pos + 1);
/* 379 */         String desc = ca.getConstPool().getMethodrefType(mref);
/* 380 */         int num = Descriptor.numOfParameters(desc) + 1;
/* 381 */         if (num > 3) {
/* 382 */           pos = iterator.insertGapAt(pos, num - 3, false).position;
/*     */         }
/* 384 */         iterator.writeByte(87, pos++);
/* 385 */         iterator.writeByte(0, pos);
/* 386 */         iterator.writeByte(0, pos + 1);
/* 387 */         Descriptor.Iterator it = new Descriptor.Iterator(desc);
View Full Code Here


            int mref = iterator.u16bitAt(pos + 1);
            ConstPool constPool = codeAttribute.getConstPool();
            iterator.write16bit(constPool.addMethodrefInfo(constPool.addClassInfo("java.lang.Object"), "<init>", "()V"), pos + 1);
            String desc = constPool.getMethodrefType(mref);
            int num = Descriptor.numOfParameters(desc) + 1;
            pos = iterator.insertGapAt(pos, num, false).position;
            Descriptor.Iterator i$ = new Descriptor.Iterator(desc);
            for (i$.next(); i$.isParameter(); i$.next()) {
              iterator.writeByte(i$.is2byte() ? Opcode.POP2 : Opcode.POP, pos++);
            }
          }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.