Package javassist.bytecode

Examples of javassist.bytecode.CodeIterator.byteAt()


      try {
        final CodeIterator itr = codeAttr.iterator();
        while ( itr.hasNext() ) {
          final int index = itr.next();
          final int op = itr.byteAt( index );
          if ( op != Opcode.PUTFIELD && op != Opcode.GETFIELD ) {
            continue;
          }

          final int constIndex = itr.u16bitAt( index + 1 );
View Full Code Here


         return;
      CodeIterator iterator = code.iterator();
      while (iterator.hasNext())
      {
         int index = iterator.next();
         int op = iterator.byteAt(index);

         if (op == Opcode.LDC || op == Opcode.LDC_W)
         {
            int index0 = iterator.byteAt(index + 1);
            int constIndex = index0;
View Full Code Here

         int index = iterator.next();
         int op = iterator.byteAt(index);

         if (op == Opcode.LDC || op == Opcode.LDC_W)
         {
            int index0 = iterator.byteAt(index + 1);
            int constIndex = index0;
            if (op == Opcode.LDC_W)
            {
               int index1 = iterator.byteAt(index + 2);
               constIndex = (index0 << 8) + index1;
View Full Code Here

         {
            int index0 = iterator.byteAt(index + 1);
            int constIndex = index0;
            if (op == Opcode.LDC_W)
            {
               int index1 = iterator.byteAt(index + 2);
               constIndex = (index0 << 8) + index1;
            }
            if (7 == constPool.getTag(constIndex))
            {
               String className = constPool.getClassInfo(constIndex);
View Full Code Here

         */
        CodeIterator iterator = minfo.getCodeAttribute().iterator();
        while (iterator.hasNext()) {
            try {
                int pos = iterator.next();
                int c = iterator.byteAt(pos);

                if (c == AALOAD)
                    initFrames(clazz, minfo);

                if (c == AALOAD || c == BALOAD || c == CALOAD || c == DALOAD
View Full Code Here

         */
        CodeIterator iterator = minfo.getCodeAttribute().iterator();
        while (iterator.hasNext()) {
            try {
                int pos = iterator.next();
                int c = iterator.byteAt(pos);

                if (c == AALOAD)
                    initFrames(clazz, minfo);

                if (c == AALOAD || c == BALOAD || c == CALOAD || c == DALOAD
View Full Code Here

         */
        CodeIterator iterator = minfo.getCodeAttribute().iterator();
        while (iterator.hasNext()) {
            try {
                int pos = iterator.next();
                int c = iterator.byteAt(pos);

                if (c == AALOAD)
                    initFrames(clazz, minfo);

                if (c == AALOAD || c == BALOAD || c == CALOAD || c == DALOAD
View Full Code Here

      try {
        CodeIterator itr = codeAttr.iterator();
        while ( itr.hasNext() ) {
          int index = itr.next();
          int op = itr.byteAt( index );
          if ( op != Opcode.PUTFIELD && op != Opcode.GETFIELD ) {
            continue;
          }

          int constIndex = itr.u16bitAt( index+1 );
View Full Code Here

    private void insertBeforeReturn(final MethodInfo method, final Bytecode s, final Bytecode b) throws BadBytecode {
        final CodeIterator itr = method.getCodeAttribute().iterator();
        itr.insert(s.get());
        while (itr.hasNext()) {
            final int pos = itr.next();
            int opcode = itr.byteAt(pos);
            if (opcode == Opcode.ARETURN) {
                itr.insert(pos, b.get());
            }
        }
        method.getCodeAttribute().computeMaxStack();
View Full Code Here

                    CodeIterator codeIterator = codeAttribute.iterator();

                    // Bon chaque instruction de cette méthode
                    while (codeIterator.hasNext()) {
                        int index = codeIterator.next();
                        int op = codeIterator.byteAt(index);

                        // DEBUG
                        // printOp(op);

                        int varNumber = -1;
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.