getTargetMethod() generalized to make it usable within InvokeVirtual.