title: Java Reflection: Find method usage in custom AbstractProcessor
body: <p>I'm newbie in reflection. Is there any way to detect where is an specific method invoked? For example:</p>
  
  <pre><code>public class MyClass {
  
     public static void method(){ 
         //DO SOMETHING
     }
  
  }
  
  public class Test {
  
      public test(){
         MyClass.method();
      }
  
  }
  
  public class MyProcessor extends AbstractProcessor {
  
     public boolean process(Set&lt;? extends TypeElement&gt; annotations, RoundEnvironment roundEnv) {
  
        Method method = MyClass.class.getDeclaredMethod("method");
  
        Class classWhereMethodIsInvoked = obtainClassWhereMethodIsInvoked(method); 
  
     }
  
     public Class obtainClassWhereMethodIsInvoked(Method method) {
        //here I want to search one class that invoke that method, in this case Test.class
     }
  
  }
  </code></pre>
  
  <p>is something like this possible or I am going crazy?</p>