List of usage examples for org.objectweb.asm Opcodes DLOAD
int DLOAD
To view the source code for org.objectweb.asm Opcodes DLOAD.
Click Source Link
From source file:org.pitest.mutationtest.engine.gregor.mutators.experimental.extended.UOIMutator2.java
License:Apache License
@Override public void visitVarInsn(int opcode, int var) { mv.visitVarInsn(opcode, var); switch (opcode) { case Opcodes.ILOAD: if (this.shouldMutate("Decremented (a--) integer local variable number " + var)) { mv.visitIincInsn(var, -1); }//from w ww.j av a2s . co m break; case Opcodes.FLOAD: if (this.shouldMutate("Decremented (a--) float local variable number " + var)) { mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.FCONST_1); mv.visitInsn(Opcodes.FSUB); mv.visitVarInsn(Opcodes.FSTORE, var); } break; case Opcodes.LLOAD: if (this.shouldMutate("Decremented (a--) long local variable number " + var)) { mv.visitInsn(Opcodes.DUP2); mv.visitInsn(Opcodes.LCONST_1); mv.visitInsn(Opcodes.LSUB); mv.visitVarInsn(Opcodes.LSTORE, var); } break; case Opcodes.DLOAD: if (this.shouldMutate("Decremented (a--) double local variable number " + var)) { mv.visitInsn(Opcodes.DUP2); mv.visitInsn(Opcodes.DCONST_1); mv.visitInsn(Opcodes.DSUB); mv.visitVarInsn(Opcodes.DSTORE, var); } break; default: break; } }
From source file:org.pitest.mutationtest.engine.gregor.mutators.experimental.extended.UOIMutator3.java
License:Apache License
@Override public void visitVarInsn(int opcode, int var) { switch (opcode) { case Opcodes.ILOAD: if (this.shouldMutate("Incremented (++a) integer local variable number " + var)) { mv.visitIincInsn(var, 1); }/*from w w w .j a v a 2s . c o m*/ mv.visitVarInsn(opcode, var); break; case Opcodes.FLOAD: if (this.shouldMutate("Incremented (++a) float local variable number " + var)) { mv.visitVarInsn(opcode, var); mv.visitInsn(Opcodes.FCONST_1); mv.visitInsn(Opcodes.FADD); mv.visitVarInsn(Opcodes.FSTORE, var); } mv.visitVarInsn(opcode, var); break; case Opcodes.LLOAD: if (this.shouldMutate("Incremented (++a) long local variable number " + var)) { mv.visitVarInsn(opcode, var); mv.visitInsn(Opcodes.LCONST_1); mv.visitInsn(Opcodes.LADD); mv.visitVarInsn(Opcodes.LSTORE, var); } mv.visitVarInsn(opcode, var); break; case Opcodes.DLOAD: if (this.shouldMutate("Incremented (++a) double local variable number " + var)) { mv.visitVarInsn(opcode, var); mv.visitInsn(Opcodes.DCONST_1); mv.visitInsn(Opcodes.DADD); mv.visitVarInsn(Opcodes.DSTORE, var); } mv.visitVarInsn(opcode, var); break; default: mv.visitVarInsn(opcode, var); break; } }
From source file:org.pitest.mutationtest.engine.gregor.mutators.experimental.extended.UOIMutator4.java
License:Apache License
@Override public void visitVarInsn(int opcode, int var) { switch (opcode) { case Opcodes.ILOAD: if (this.shouldMutate("Decremented (--a) integer local variable number " + var)) { mv.visitIincInsn(var, -1); }/*w w w. j av a2s . co m*/ mv.visitVarInsn(opcode, var); break; case Opcodes.FLOAD: if (this.shouldMutate("Decremented (--a) float local variable number " + var)) { mv.visitVarInsn(opcode, var); mv.visitInsn(Opcodes.FCONST_1); mv.visitInsn(Opcodes.FSUB); mv.visitVarInsn(Opcodes.FSTORE, var); } mv.visitVarInsn(opcode, var); break; case Opcodes.LLOAD: if (this.shouldMutate("Decremented (--a) long local variable number " + var)) { mv.visitVarInsn(opcode, var); mv.visitInsn(Opcodes.LCONST_1); mv.visitInsn(Opcodes.LSUB); mv.visitVarInsn(Opcodes.LSTORE, var); } mv.visitVarInsn(opcode, var); break; case Opcodes.DLOAD: if (this.shouldMutate("Decremented (--a) double local variable number " + var)) { mv.visitVarInsn(opcode, var); mv.visitInsn(Opcodes.DCONST_1); mv.visitInsn(Opcodes.DSUB); mv.visitVarInsn(Opcodes.DSTORE, var); } mv.visitVarInsn(opcode, var); break; default: mv.visitVarInsn(opcode, var); break; } }
From source file:org.sonar.java.bytecode.se.BytecodeEGWalkerExecuteTest.java
License:Open Source License
@Test public void test_load() throws Exception { int[] loadRefOpcodes = new int[] { Opcodes.ILOAD, Opcodes.LLOAD, Opcodes.FLOAD, Opcodes.DLOAD, Opcodes.ALOAD };/*from w w w . j a v a 2 s .c o m*/ for (int loadRefOpcode : loadRefOpcodes) { SymbolicValue loadRef = new SymbolicValue(); ProgramState programState = execute(new Instruction(loadRefOpcode, 0), ProgramState.EMPTY_STATE.put(0, loadRef)); assertThat(programState.peekValue()).isEqualTo(loadRef); // no SV indexed should failed assertThatThrownBy(() -> execute(new Instruction(loadRefOpcode, 0), ProgramState.EMPTY_STATE)) .hasMessage("Loading a symbolic value unindexed"); } }
From source file:org.spongepowered.despector.emitter.bytecode.instruction.BytecodeLocalAccessEmitter.java
License:Open Source License
@Override public void emit(BytecodeEmitterContext ctx, LocalAccess arg, TypeSignature t) { MethodVisitor mv = ctx.getMethodVisitor(); TypeSignature type = arg.getLocal().getType(); if (type == ClassTypeSignature.INT || type == ClassTypeSignature.BOOLEAN || type == ClassTypeSignature.BYTE || type == ClassTypeSignature.SHORT || type == ClassTypeSignature.CHAR) { mv.visitVarInsn(Opcodes.ILOAD, arg.getLocal().getIndex()); } else if (type == ClassTypeSignature.LONG) { mv.visitVarInsn(Opcodes.LLOAD, arg.getLocal().getIndex()); } else if (type == ClassTypeSignature.FLOAT) { mv.visitVarInsn(Opcodes.FLOAD, arg.getLocal().getIndex()); } else if (type == ClassTypeSignature.DOUBLE) { mv.visitVarInsn(Opcodes.DLOAD, arg.getLocal().getIndex()); } else {/*from w w w . j a v a 2 s .c o m*/ mv.visitVarInsn(Opcodes.ALOAD, arg.getLocal().getIndex()); } ctx.updateStack(1); }
From source file:pt.minha.kernel.instrument.SyncToMonitorClassVisitor.java
License:Open Source License
public void makeStub(int access, String name, String desc, String signature, String[] exceptions) { Method m = new Method(name, desc); MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); mv.visitCode();//from w w w . j a va 2 s . c o m Label begin = new Label(); Label pre_invoke = new Label(); Label pos_leave = new Label(); Label in_catch = new Label(); Label pre_rethrow = new Label(); Label end = new Label(); mv.visitTryCatchBlock(pre_invoke, pos_leave, in_catch, null); mv.visitTryCatchBlock(in_catch, pre_rethrow, in_catch, null); mv.visitLabel(begin); int offset; if ((access & Opcodes.ACC_STATIC) == 0) { mv.visitVarInsn(Opcodes.ALOAD, 0); offset = 1; } else { mv.visitFieldInsn(Opcodes.GETSTATIC, clz, "_fake_class", "L" + ClassConfig.fake_prefix + "java/lang/Object;"); offset = 0; } int length = 0; for (Type t : m.getArgumentTypes()) length += t.getSize(); mv.visitInsn(Opcodes.DUP); mv.visitVarInsn(Opcodes.ASTORE, offset + length); mv.visitInsn(Opcodes.MONITORENTER); mv.visitLabel(pre_invoke); if ((access & Opcodes.ACC_STATIC) == 0) mv.visitVarInsn(Opcodes.ALOAD, 0); int i = offset; for (Type t : m.getArgumentTypes()) { // t.getOpcode() should work for long and double too... :-( if (t.getClassName().equals("long")) mv.visitVarInsn(Opcodes.LLOAD, i); else if (t.getClassName().equals("double")) mv.visitVarInsn(Opcodes.DLOAD, i); else mv.visitVarInsn(t.getOpcode(Opcodes.ILOAD), i); i += t.getSize(); } boolean itf = (access & Opcodes.ACC_INTERFACE) != 0; if ((access & Opcodes.ACC_STATIC) == 0) mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, clz, "_" + name, desc, itf); else mv.visitMethodInsn(Opcodes.INVOKESTATIC, clz, "_" + name, desc, itf); mv.visitVarInsn(Opcodes.ALOAD, offset + length); mv.visitInsn(Opcodes.MONITOREXIT); mv.visitLabel(pos_leave); if (m.getReturnType().equals(Type.VOID_TYPE)) mv.visitInsn(Opcodes.RETURN); else mv.visitInsn(m.getReturnType().getOpcode(Opcodes.IRETURN)); mv.visitLabel(in_catch); mv.visitVarInsn(Opcodes.ALOAD, offset + length); mv.visitInsn(Opcodes.MONITOREXIT); mv.visitLabel(pre_rethrow); mv.visitInsn(Opcodes.ATHROW); mv.visitLabel(end); i = 0; if ((access & Opcodes.ACC_STATIC) == 0) mv.visitLocalVariable("this", "L" + clz + ";", null, begin, end, i++); for (Type t : m.getArgumentTypes()) mv.visitLocalVariable("arg" + i, t.getDescriptor(), null, begin, end, i++); mv.visitMaxs(0, 0); mv.visitEnd(); }
From source file:scouter.agent.asm.ApicallASM.java
License:Apache License
public void visitCode() { int sidx = isStatic ? 0 : 1; int arrVarIdx = newLocal(Type.getType("[Ljava/lang/Object;")); AsmUtil.PUSH(mv, paramTypes.length); mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/Object"); mv.visitVarInsn(Opcodes.ASTORE, arrVarIdx); for (int i = 0; i < paramTypes.length; i++) { Type tp = paramTypes[i];// www. ja va 2 s . c o m mv.visitVarInsn(Opcodes.ALOAD, arrVarIdx); AsmUtil.PUSH(mv, i); switch (tp.getSort()) { case Type.BOOLEAN: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", false); break; case Type.BYTE: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;", false); break; case Type.CHAR: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Character", "valueOf", "(C)Ljava/lang/Character;", false); break; case Type.SHORT: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;", false); break; case Type.INT: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); break; case Type.LONG: mv.visitVarInsn(Opcodes.LLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;", false); break; case Type.FLOAT: mv.visitVarInsn(Opcodes.FLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Float", "valueOf", "(F)Ljava/lang/Float;", false); break; case Type.DOUBLE: mv.visitVarInsn(Opcodes.DLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;", false); break; default: mv.visitVarInsn(Opcodes.ALOAD, sidx); } mv.visitInsn(Opcodes.AASTORE); sidx += tp.getSize(); } AsmUtil.PUSH(mv, className); AsmUtil.PUSH(mv, methodName); AsmUtil.PUSH(mv, methodDesc); if (isStatic) { AsmUtil.PUSHNULL(mv); } else { mv.visitVarInsn(Opcodes.ALOAD, 0); } mv.visitVarInsn(Opcodes.ALOAD, arrVarIdx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, TRACESUBCALL, START_METHOD, START_SIGNATURE, false); statIdx = newLocal(Type.getType(Object.class)); mv.visitVarInsn(Opcodes.ASTORE, statIdx); mv.visitLabel(startFinally); mv.visitCode(); }
From source file:scouter.agent.asm.ApicallASM.java
License:Apache License
private void capReturn() { Type tp = returnType;//w w w . ja v a2 s . com if (tp == null || tp.equals(Type.VOID_TYPE)) { mv.visitVarInsn(Opcodes.ALOAD, statIdx); mv.visitInsn(Opcodes.ACONST_NULL); mv.visitInsn(Opcodes.ACONST_NULL); mv.visitMethodInsn(Opcodes.INVOKESTATIC, TRACESUBCALL, END_METHOD, END_SIGNATURE, false); return; } int i = newLocal(tp); switch (tp.getSort()) { case Type.BOOLEAN: mv.visitVarInsn(Opcodes.ISTORE, i); mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; case Type.BYTE: mv.visitVarInsn(Opcodes.ISTORE, i); mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; case Type.CHAR: mv.visitVarInsn(Opcodes.ISTORE, i); mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Character", "valueOf", "(C)Ljava/lang/Character;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; case Type.SHORT: mv.visitVarInsn(Opcodes.ISTORE, i); mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; case Type.INT: mv.visitVarInsn(Opcodes.ISTORE, i); mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.ILOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; case Type.LONG: mv.visitVarInsn(Opcodes.LSTORE, i); mv.visitVarInsn(Opcodes.LLOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.LLOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; case Type.FLOAT: mv.visitVarInsn(Opcodes.FSTORE, i); mv.visitVarInsn(Opcodes.FLOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.FLOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Float", "valueOf", "(F)Ljava/lang/Float;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; case Type.DOUBLE: mv.visitVarInsn(Opcodes.DSTORE, i); mv.visitVarInsn(Opcodes.DLOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.DLOAD, i); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;", false); mv.visitInsn(Opcodes.ACONST_NULL);// throwable break; default: mv.visitVarInsn(Opcodes.ASTORE, i); mv.visitVarInsn(Opcodes.ALOAD, i); mv.visitVarInsn(Opcodes.ALOAD, statIdx);// stat mv.visitVarInsn(Opcodes.ALOAD, i);// return mv.visitInsn(Opcodes.ACONST_NULL);// throwable } mv.visitMethodInsn(Opcodes.INVOKESTATIC, TRACESUBCALL, END_METHOD, END_SIGNATURE, false); }
From source file:scouter.agent.asm.ApicallInfoASM.java
License:Apache License
public void visitCode() { int sidx = isStatic ? 0 : 1; int arrVarIdx = newLocal(Type.getType("[Ljava/lang/Object;")); AsmUtil.PUSH(mv, paramTypes.length); mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/Object"); mv.visitVarInsn(Opcodes.ASTORE, arrVarIdx); for (int i = 0; i < paramTypes.length; i++) { Type tp = paramTypes[i];/*from ww w . j av a 2s .co m*/ mv.visitVarInsn(Opcodes.ALOAD, arrVarIdx); AsmUtil.PUSH(mv, i); switch (tp.getSort()) { case Type.BOOLEAN: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", false); break; case Type.BYTE: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;", false); break; case Type.CHAR: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Character", "valueOf", "(C)Ljava/lang/Character;", false); break; case Type.SHORT: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;", false); break; case Type.INT: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); break; case Type.LONG: mv.visitVarInsn(Opcodes.LLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;", false); break; case Type.FLOAT: mv.visitVarInsn(Opcodes.FLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Float", "valueOf", "(F)Ljava/lang/Float;", false); break; case Type.DOUBLE: mv.visitVarInsn(Opcodes.DLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;", false); break; default: mv.visitVarInsn(Opcodes.ALOAD, sidx); } mv.visitInsn(Opcodes.AASTORE); sidx += tp.getSize(); } AsmUtil.PUSH(mv, className); AsmUtil.PUSH(mv, methodName); AsmUtil.PUSH(mv, methodDesc); if (isStatic) { AsmUtil.PUSHNULL(mv); } else { mv.visitVarInsn(Opcodes.ALOAD, 0); } mv.visitVarInsn(Opcodes.ALOAD, arrVarIdx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, TRACESUBCALL, START_METHOD, START_SIGNATURE, false); mv.visitCode(); }
From source file:scouter.agent.asm.CapArgsASM.java
License:Apache License
@Override public void visitCode() { int sidx = isStatic ? 0 : 1; int arrVarIdx = newLocal(Type.getType("[Ljava/lang/Object;")); AsmUtil.PUSH(mv, paramTypes.length); mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/Object"); mv.visitVarInsn(Opcodes.ASTORE, arrVarIdx); for (int i = 0; i < paramTypes.length; i++) { Type type = paramTypes[i]; mv.visitVarInsn(Opcodes.ALOAD, arrVarIdx); AsmUtil.PUSH(mv, i);/*from www .ja v a 2s . co m*/ switch (type.getSort()) { case Type.BOOLEAN: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", false); break; case Type.BYTE: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;", false); break; case Type.CHAR: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Character", "valueOf", "(C)Ljava/lang/Character;", false); break; case Type.SHORT: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;", false); break; case Type.INT: mv.visitVarInsn(Opcodes.ILOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); break; case Type.LONG: mv.visitVarInsn(Opcodes.LLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;", false); break; case Type.FLOAT: mv.visitVarInsn(Opcodes.FLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Float", "valueOf", "(F)Ljava/lang/Float;", false); break; case Type.DOUBLE: mv.visitVarInsn(Opcodes.DLOAD, sidx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;", false); break; default: mv.visitVarInsn(Opcodes.ALOAD, sidx); } mv.visitInsn(Opcodes.AASTORE); sidx += type.getSize(); } AsmUtil.PUSH(mv, className); AsmUtil.PUSH(mv, methodName); AsmUtil.PUSH(mv, methodDesc); if (isStatic) { AsmUtil.PUSHNULL(mv); } else { mv.visitVarInsn(Opcodes.ALOAD, 0); } mv.visitVarInsn(Opcodes.ALOAD, arrVarIdx); mv.visitMethodInsn(Opcodes.INVOKESTATIC, CLASS, METHOD, SIGNATURE, false); mv.visitCode(); }