@Override protected void onMethodExit(int opcode) { super.onMethodExit(opcode); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKESTATIC, "com/inapptics/sdk/internal/exposed/Interception", "onOkHttp", "(Ljava/lang/Object;)V", false); }
@Override protected void onMethodExit(int opcode) { super.onMethodExit(opcode); if (injected) { mv.visitLdcInsn(className + ":" + name + descriptor); mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "nanoTime", "()J", false); mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"); mv.visitLdcInsn("========end========="); mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); } } };
@Override protected void onMethodExit(int i) { super.onMethodExit(i); if (className.contains("TimeCost")) { return; } mv.visitLdcInsn(className+"_"+name); mv.visitMethodInsn(INVOKESTATIC, "com/dany/util/TimeCost", "setEndTime", "(Ljava/lang/String;)V", false); // mv.visitLdcInsn(className); // mv.visitVarInsn(ASTORE, 0); // mv.visitLdcInsn(name); // mv.visitVarInsn(ASTORE, 1); // mv.visitVarInsn(ALOAD, 0); // mv.visitVarInsn(ALOAD, 1); // mv.visitMethodInsn(INVOKESTATIC, "com/dany/util/TimeCost", "setEndTime", "(Ljava/lang/String;Ljava/lang/String;)V", false); } };
/** {@inheritDoc} */ @Override public void onMethodExit(int opcode) { // TODO: Check for <clinit> if (opcode != Opcodes.ATHROW) { mv.visitLdcInsn(className); mv.visitLdcInsn(fullMethodName); mv.visitMethodInsn(Opcodes.INVOKESTATIC, PackageInfo.getNameWithSlash(org.evosuite.testcase.execution.ExecutionTracer.class), "leftMethod", "(Ljava/lang/String;Ljava/lang/String;)V", false); } super.onMethodExit(opcode); }
throw new IllegalArgumentException("Invalid return in constructor"); case RETURN: // empty stack onMethodExit(opcode); break; case ATHROW: // 1 before n/a after popValue(); onMethodExit(opcode); break; case NOP: case DRETURN: case ATHROW: onMethodExit(opcode); break; default:
switch (opcode) { case RETURN: // empty stack onMethodExit(opcode); break; case IRETURN: // 1 before n/a after case ATHROW: // 1 before n/a after popValue(); onMethodExit(opcode); break; case LRETURN: // 2 before n/a after popValue(); popValue(); onMethodExit(opcode); break; case NOP: case DRETURN: case ATHROW: onMethodExit(opcode); break;
throw new IllegalArgumentException("Invalid return in constructor"); case RETURN: // empty stack onMethodExit(opcode); break; case ATHROW: // 1 before n/a after popValue(); onMethodExit(opcode); break; case NOP: case DRETURN: case ATHROW: onMethodExit(opcode); break; default:
throw new IllegalArgumentException("Invalid return in constructor"); case RETURN: // empty stack onMethodExit(opcode); break; case ATHROW: // 1 before n/a after popValue(); onMethodExit(opcode); break; case NOP: case DRETURN: case ATHROW: onMethodExit(opcode); break; default: