title: Groovy, get enclosing function's name?
body: <p>I'm using Groovy 1.8.4, trying to get the name of the enclosing function...</p>
  
  <pre><code>def myFunction() {
    println functionName??
  }
  </code></pre>
  
  <p>I've tried <code>delegate</code>, <code>this</code>, <code>owner</code>, Groovy complains no such objects found.</p>
  
  <p>I also tried the Java hack <code>new Exception().getStackTrace()[0].getMethodName()</code>, but that just prints <code>newInstance0</code></p>