title: how to find a method is currently executing in java?
body: <p>I want to know how i can find a particular method is currently running,if it is currently running i don't want to execute another function. </p>
  
  <pre><code>Class myclass extending someclass{
    private void method A(){
  
    //somthing here
    }
  
    private void method B(){
  
    //somthing here
    }
  
    private void method C(){
     B();//don't want to call B if A is running 
  
    //somthing here
    }
  }
  </code></pre>
  
  <p>boolean flag ia not working.I don't want static boolean flag.I am calling different function when orientation of mobile device changes but in one of four orientation i was to check whether a function is currently running or not.</p>