lundi 11 février 2019

Java: How to identify if a class calls a specific method

Is it possible to identify, probably using reflection, whether some method within a specific java class calls another method?

Let's say that I have

  • ClassA that declares methodA1()
  • ClassB that declares methodB1(), methodB2(), methodB3()

I'd like to know if any of ClassB's members call methodA1(). Is that possible?

I'm using JDK8 right now.

I'm surprised that I cannot find this question asked, which makes me think that it is very naive.

Thanks!





Aucun commentaire:

Enregistrer un commentaire