Package javassist.bytecode

Examples of javassist.bytecode.StackMapTable$InsertLocal


    minfo.setCodeAttribute(code.toCodeAttribute());
    minfo.setAccessFlags(AccessFlag.PUBLIC);
    CodeAttribute codeAttribute = minfo.getCodeAttribute();
    if (codeAttribute != null) {
      StackMapTable smt = MapMaker.make(classPool, minfo);
      codeAttribute.setAttribute(smt);
    }
    classfile.addMethod(minfo);
  }
View Full Code Here


    minfo.setCodeAttribute(code.toCodeAttribute());
    minfo.setAccessFlags(AccessFlag.PUBLIC);
    CodeAttribute codeAttribute = minfo.getCodeAttribute();
    if (codeAttribute != null) {
      StackMapTable smt = MapMaker.make(classPool, minfo);
      codeAttribute.setAttribute(smt);
    }
    classfile.addMethod(minfo);
  }
View Full Code Here

      while (iter.hasNext()) {
        int pos = iter.next();
        pos = transformInvokevirtualsIntoGetfields(classfile, iter, pos);
        pos = transformInvokevirtualsIntoPutfields(classfile, iter, pos);
      }
      StackMapTable smt = MapMaker.make(classPool, minfo);
      codeAttr.setAttribute(smt);
    }
  }
View Full Code Here

            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( write_method_index, index+1 );
          }
        }

        StackMapTable smt = MapMaker.make( classPool, methodInfo );
        methodInfo.getCodeAttribute().setAttribute(smt);
      }
      catch (BadBytecode e) {
        throw new EnhancementException(
            "Unable to perform field access transformation in method : " + methodName,
View Full Code Here

            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( writeMethodIndex, index+1 );
          }
        }

        final StackMapTable smt = MapMaker.make( classPool, methodInfo );
        methodInfo.getCodeAttribute().setAttribute( smt );
      }
      catch (BadBytecode e) {
        throw new EnhancementException(
            "Unable to perform field access transformation in method : " + methodName,
View Full Code Here

            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( write_method_index, index+1 );
          }
        }

        StackMapTable smt = MapMaker.make( classPool, methodInfo );
        methodInfo.getCodeAttribute().setAttribute(smt);
      }
      catch (BadBytecode e) {
        throw new EnhancementException(
            "Unable to perform field access transformation in method : " + methodName,
View Full Code Here

            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( writeMethodIndex, index+1 );
          }
        }

        final StackMapTable smt = MapMaker.make( classPool, methodInfo );
        methodInfo.getCodeAttribute().setAttribute( smt );
      }
      catch (BadBytecode e) {
        throw new EnhancementException(
            "Unable to perform field access transformation in method : " + methodName,
View Full Code Here

/*  621 */       LocalVariableAttribute va = (LocalVariableAttribute)ca.getAttribute("LocalVariableTable");
/*      */
/*  624 */       if (va != null) {
/*  625 */         va.shiftIndex(where, size);
/*      */       }
/*  627 */       StackMapTable smt = (StackMapTable)ca.getAttribute("StackMapTable");
/*  628 */       if (smt != null) {
/*  629 */         smt.insertLocal(where, StackMapTable.typeTagOf(typeDesc), classInfo);
/*      */       }
/*  631 */       StackMap sm = (StackMap)ca.getAttribute("StackMap");
/*  632 */       if (sm != null)
/*  633 */         sm.insertLocal(where, StackMapTable.typeTagOf(typeDesc), classInfo);
/*      */     }
View Full Code Here

/* 63 */         iterator.writeByte(0, pos + 1);
/* 64 */         iterator.writeByte(0, pos + 2);
/* 65 */         iterator.writeByte(0, pos + 3);
/* 66 */         this.nested += 1;
/*    */
/* 68 */         StackMapTable smt = (StackMapTable)iterator.get().getAttribute("StackMapTable");
/*    */
/* 70 */         if (smt != null) {
/* 71 */           smt.removeNew(pos);
/*    */         }
/* 73 */         StackMap sm = (StackMap)iterator.get().getAttribute("StackMap");
/*    */
/* 75 */         if (sm != null)
/* 76 */           sm.removeNew(pos);
View Full Code Here

    code.addIndex(field_index);
    // areturn // return the value of the field
    code.addOpcode(Opcode.ARETURN);
    minfo.setCodeAttribute(code.toCodeAttribute());
    minfo.setAccessFlags(AccessFlag.PUBLIC);
    StackMapTable smt = MapMaker.make(ClassPool.getDefault(), minfo);
    minfo.getCodeAttribute().setAttribute(smt);
    classfile.addMethod(minfo);
  }
View Full Code Here

TOP

Related Classes of javassist.bytecode.StackMapTable$InsertLocal

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.