0

We could examine the jar and find the method that gets called and place a breakpoint on it, but is there a better way?

Draken
  • 3,134
  • 13
  • 34
  • 54
Mike
  • 609
  • 12
  • 36
  • You could mock it and count how many time it's called. – Federico klez Culloca Feb 26 '20 at 14:14
  • Note that the linked-to approach (and almost all other ones) will only find normal method calls in traditional Java code. Anything that calls the method via reflection will be much harder to detect (and could theoretically boil down to the halting problem which means it's effectively impossible to reliably detect in all cases). – Joachim Sauer Feb 26 '20 at 14:19
  • @Federico Your way is possible to identify that a method is called. But you can't tell the opposite because you never know if the method may be called in some very specific situation that had not occurred yet. – Robert Feb 26 '20 at 14:19

0 Answers0