title: get Name of enclosing Method
body: <p>having the method</p>
  
  <pre><code>public void foo(){
    //..    
  }
  </code></pre>
  
  <p><strong>Is there a way to get the methodName (in this case foo) at runtime?</strong></p>
  
  <p>I know how to get the classname via </p>
  
  <blockquote>
    <p>this.getClass().getName()</p>
  </blockquote>
  
  <p>or to get all public methods via
  <code>Method[] methods = this.getClass().getMethods();</code>
  Once I have the method name the parameters would also be important as there could be several methods with same name</p>