Package javassist.bytecode

Examples of javassist.bytecode.CodeIterator.writeByte()


            final int readMethodIndex = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
                attributeDescriptor.getReader().getName(),
                attributeDescriptor.getReader().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( readMethodIndex, index+1 );
          }
          else {
            final int writeMethodIndex = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
View Full Code Here


            final int writeMethodIndex = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
                attributeDescriptor.getWriter().getName(),
                attributeDescriptor.getWriter().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( writeMethodIndex, index+1 );
          }
        }

        final StackMapTable smt = MapMaker.make( classPool, methodInfo );
View Full Code Here

               int theClassName = constPool.addStringInfo(className.replace('/', '.'));
               if (op == Opcode.LDC_W)
               {
                  int b0 = theClassName >>> 8;
                  int b1 = theClassName & 0x0FF;
                  iterator.writeByte(b0, index + 1);
                  iterator.writeByte(b1, index + 2);
               }
               else
               {
                  iterator.writeByte(theClassName, index + 1);
View Full Code Here

               if (op == Opcode.LDC_W)
               {
                  int b0 = theClassName >>> 8;
                  int b1 = theClassName & 0x0FF;
                  iterator.writeByte(b0, index + 1);
                  iterator.writeByte(b1, index + 2);
               }
               else
               {
                  iterator.writeByte(theClassName, index + 1);
               }
View Full Code Here

                  iterator.writeByte(b0, index + 1);
                  iterator.writeByte(b1, index + 2);
               }
               else
               {
                  iterator.writeByte(theClassName, index + 1);
               }
               int classClass = constPool.addClassInfo("java/lang/Class");
               int descriptor = constPool.addMethodrefInfo(classClass, "forName",
                     "(Ljava/lang/String;)Ljava/lang/Class;");
               iterator.insert(new byte[]
View Full Code Here

/* 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);
/*     */         while (true) {
/* 389 */           it.next();
View Full Code Here

/* 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);
/*     */         while (true) {
/* 389 */           it.next();
/* 390 */           if (!it.isParameter()) break;
View Full Code Here

/* 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);
/*     */         while (true) {
/* 389 */           it.next();
/* 390 */           if (!it.isParameter()) break;
/* 391 */           iterator.writeByte(it.is2byte() ? 88 : 87, pos++);
View Full Code Here

/* 386 */         iterator.writeByte(0, pos + 1);
/* 387 */         Descriptor.Iterator it = new Descriptor.Iterator(desc);
/*     */         while (true) {
/* 389 */           it.next();
/* 390 */           if (!it.isParameter()) break;
/* 391 */           iterator.writeByte(it.is2byte() ? 88 : 87, pos++);
/*     */         }
/*     */
/*     */       }
/*     */
/*     */     }
View Full Code Here

            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++);
            }
          }
          methodInfo.rebuildStackMapIf6(newClass.getClassPool(), newClass.getClassFile2());
        }
      }
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.