/** * Replaces any interaction with a matched byte code element with a non-static method access on the first * parameter of the matched element. When matching a non-static field access or method invocation, the * substituted method is located on the same receiver type as the original access. For static access, the * first argument is used as a receiver. * * @param matcher A matcher for locating a method on the original interaction's receiver type. * @return A member substitution that replaces any matched byte code element with an access of the matched method. */ public MemberSubstitution replaceWithMethod(ElementMatcher<? super MethodDescription> matcher) { return replaceWithMethod(matcher, methodGraphCompiler); }