Open gunnarmorling opened 7 years ago
So I solved this by filtering out all method calls whose select is of type MethodInvocation
. Perhaps one could have some way to control the result set of findMethodCalls()
more specifically for such purposes?
I'm having these classes:
And I'm applying the following refactoring:
Then both method invocations in
B#test()
are modified:The change of
AFactory.make()
is surprising. I see how that expression is the target of in invocation offoo()
, so it makes sense in a way. Am I just missing the right way to exclude this invocation?I think in the end a way would be needed to tie a selected invocation not to the type declaring the method but to the element (field, local variable etc.) it is invoked on.