Can I instrument outgoing method/constructor calls with ByteBuddy?
问题 I have a project where I was using Javassist to log outgoing method/constructor calls with code like this: CtMethod cm = ... ; cm.instrument( new ExprEditor() { public void edit(MethodCall m) throws CannotCompileException { if (m.getClassName().equals("Point") && m.getMethodName().equals("move")) m.replace("{ $1 = 0; $_ = $proceed($$); }"); } }); which assigns '0' to the first argument of the called method and then proceeds with the original call, that is, if cm represents the method