title: How to generate AST from Java source-code?
body: <p>As far as I know, the only way to parse Java source-code into an AST (Abstract Syntax Tree) is to use the <a href="http://weblogs.java.net/blog/2006/09/16/hacking-javac" rel="noreferrer">Java Compiler Tree API</a>: com.sun.source.tree</p>
  
  <p>I have two questions:</p>
  
  <ol>
  <li>What JDKs support com.sun.source.tree?</li>
  <li>Is there a portable replacement that works for all JDKs?</li>
  </ol>