title: How to get method body from ExecutableElement
body: <p>In my <code>AbstractProcessor</code> I am able to get all methods from a class annotated with some annotation, I have created:</p>
  <pre><code>List&lt;? extends Element&gt; allElements = processingEnv.getElementUtils().getAllMembers((TypeElement) bean);
  List&lt;ExecutableElement&gt; methods = ElementFilter.methodsIn(allElements);
  </code></pre>
  <p>Is is possible to get the body of the method/<code>ExecutableElement</code>? The API only seem to deal with the signature and modifiers.</p>
  <p>I could probably use some variation of <a href="https://stackoverflow.com/a/34568708/6095334">this answer</a> to access classes from the proprietary <code>.sun.*</code> package, such as <code>com.sun.tools.javac.tree.JCTree$MethodTree</code>:</p>
  <pre><code>MethodTree methodTree = trees.getTree(executableElement);
  </code></pre>
  <p>where <code>trees</code> is an instance of <code>com.sun.source.util.Trees</code> set in the AbstractProcessor's init() method as so:</p>
  <pre><code>trees = Trees.instance(processingEnv);
  </code></pre>
  <p>But these classes come with the warning:</p>
  <blockquote>
  <p>This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.</p>
  </blockquote>
  <p>I would hope that it was possible to access an annotated method's body from within the more general annotation processing framework.</p>