Package jodd.asm5

Examples of jodd.asm5.MethodVisitor.visitMethodInsn()


  protected void makeStaticInitBlock() {
    if (wd.adviceClinits != null) {
      MethodVisitor mv = wd.dest.visitMethod(AsmUtil.ACC_STATIC, CLINIT, DESC_VOID, null, null);
      mv.visitCode();
      for (String name : wd.adviceClinits) {
        mv.visitMethodInsn(INVOKESTATIC, wd.thisReference, name, DESC_VOID);
      }
      mv.visitInsn(RETURN);
      mv.visitMaxs(0, 0);
      mv.visitEnd();
    }
View Full Code Here


    MethodVisitor mv = wd.dest.visitMethod(AsmUtil.ACC_PRIVATE | AsmUtil.ACC_FINAL, initMethodName, DESC_VOID, null, null);
    mv.visitCode();
    if (wd.adviceInits != null) {
      for (String name : wd.adviceInits) {
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, wd.thisReference, name, DESC_VOID);
      }
    }
    mv.visitInsn(RETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
View Full Code Here

                  if (td.isLastMethodInChain()) {                            // last proxy method just calls super target method

                    if (wd.isWrapper() == false) {
                      // PROXY
                      loadSpecialMethodArguments(mv, td.msign);
                      mv.visitMethodInsn(INVOKESPECIAL, wd.superReference, td.msign.getMethodName(), td.msign.getDescription());
                    } else {
                      // WRAPPER
                      mv.visitVarInsn(ALOAD, 0);
                      mv.visitFieldInsn(GETFIELD, wd.thisReference, wd.wrapperRef, wd.wrapperType);
                      loadVirtualMethodArguments(mv, td.msign);
View Full Code Here

                      // WRAPPER
                      mv.visitVarInsn(ALOAD, 0);
                      mv.visitFieldInsn(GETFIELD, wd.thisReference, wd.wrapperRef, wd.wrapperType);
                      loadVirtualMethodArguments(mv, td.msign);
                      if (wd.wrapInterface) {
                        mv.visitMethodInsn(INVOKEINTERFACE, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      } else {
                        mv.visitMethodInsn(INVOKEVIRTUAL, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      }
                    }
View Full Code Here

                      mv.visitFieldInsn(GETFIELD, wd.thisReference, wd.wrapperRef, wd.wrapperType);
                      loadVirtualMethodArguments(mv, td.msign);
                      if (wd.wrapInterface) {
                        mv.visitMethodInsn(INVOKEINTERFACE, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      } else {
                        mv.visitMethodInsn(INVOKEVIRTUAL, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      }
                    }

                    prepareReturnValue(mv, td.msign, aspectData.maxLocalVarOffset);     // [F4]
                    traceNext = true;
View Full Code Here

                    prepareReturnValue(mv, td.msign, aspectData.maxLocalVarOffset);     // [F4]
                    traceNext = true;
                  } else {                                                    // calls next proxy method
                    loadSpecialMethodArguments(mv, td.msign);
                    mv.visitMethodInsn(INVOKESPECIAL, wd.thisReference, td.nextMethodName(), td.msign.getDescription());
                    visitReturn(mv, td.msign, false);
                  }
                  return;
                } else
View Full Code Here

                  if (td.isLastMethodInChain()) {                            // last proxy method just calls super target method

                    if (wd.isWrapper() == false) {
                      // PROXY
                      loadSpecialMethodArguments(mv, td.msign);
                      mv.visitMethodInsn(INVOKESPECIAL, wd.superReference, td.msign.getMethodName(), td.msign.getDescription());
                    } else {
                      // WRAPPER
                      mv.visitVarInsn(ALOAD, 0);
                      mv.visitFieldInsn(GETFIELD, wd.thisReference, wd.wrapperRef, wd.wrapperType);
                      loadVirtualMethodArguments(mv, td.msign);
View Full Code Here

                      // WRAPPER
                      mv.visitVarInsn(ALOAD, 0);
                      mv.visitFieldInsn(GETFIELD, wd.thisReference, wd.wrapperRef, wd.wrapperType);
                      loadVirtualMethodArguments(mv, td.msign);
                      if (wd.wrapInterface) {
                        mv.visitMethodInsn(INVOKEINTERFACE, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      } else {
                        mv.visitMethodInsn(INVOKEVIRTUAL, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      }
                    }
View Full Code Here

                      mv.visitFieldInsn(GETFIELD, wd.thisReference, wd.wrapperRef, wd.wrapperType);
                      loadVirtualMethodArguments(mv, td.msign);
                      if (wd.wrapInterface) {
                        mv.visitMethodInsn(INVOKEINTERFACE, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      } else {
                        mv.visitMethodInsn(INVOKEVIRTUAL, wd.wrapperType.substring(1, wd.wrapperType.length() - 1), td.msign.getMethodName(), td.msign.getDescription());
                      }
                    }

                    prepareReturnValue(mv, td.msign, aspectData.maxLocalVarOffset);     // [F4]
                    traceNext = true;
View Full Code Here

                    prepareReturnValue(mv, td.msign, aspectData.maxLocalVarOffset);     // [F4]
                    traceNext = true;
                  } else {                                                    // calls next proxy method
                    loadSpecialMethodArguments(mv, td.msign);
                    mv.visitMethodInsn(INVOKESPECIAL, wd.thisReference, td.nextMethodName(), td.msign.getDescription());
                    visitReturn(mv, td.msign, false);
                  }
                  return;
                }
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.