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 at build time?

Let's say that I have

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

I'd like to know, at build time, 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.



I am using Apache Active MQ with Spring..... the problem I am facing is that I am creating producer on one machine let say Machine1 and I am creating one consumer on second machine let say Machine2... ...

I am trying to pass dimensions to a Java Swing JPanel creator class. No luck so far. I even put the contentPane.setPreferredSize(new Dimension(intWidth, intHeight)); in a try / catch block and I did ...

To illustrate my point: I have Name Age and Address of 4 people [Sam, 23, nj], [Nome, 25, ny], [Sim, 20, pa], [Jack, 12, pa] I need to send these 4 rows to the java side. I am familiar with java ...

I'm involved in a project where we generate pdf-files using iText. I want to generate superscipt text and I know that methods exists for converting chunks of text to superscript however, I am in a ...