title: Documenting Salesforce.com Apex class files
body: <p>Since the Salesforce.com Apex language is "Java-like", I'd like to use javadoc or Doxygen to generate API documentation for the package we plan to release on App Exchange.</p>
  
  <p>I found an <a href="http://code.google.com/p/apexdoc/" rel="nofollow noreferrer">ApexDoc</a> project on Google Code, but it's severely limited and uses a naive parser to generate HTML output.  I'd much rather take advantage of the existing Doxygen parsers and output generators than try to reinvent that wheel from scratch.</p>
  
  <p>So, my questions:</p>
  
  <p>1) Has anyone been able to use javadoc or Doxygen to generate API documentation for their Apex classes?  How were you able to do it?</p>
  
  <p>2) I'm wondering how hard it would be to write a simple script to create a series of .java files from the .cls Apex class files, adding fake <code>import</code> statements and possibly modifying certain declarations to keep Doxygen happy.  Any thoughts on what Doxygen (or javadoc) is choking on when it tries to parse an Apex .cls file?</p>
  
  <p>I'm amazed that Salesforce doesn't provide such a tool or hasn't contributed an Apex parser to javadoc/Doxygen.  Their documentation and developer tools are extensive, and they've got a great automated test setup.  I haven't found anything from them for auto generating classes.</p>
  
  <p>EDIT: Please view the <a href="https://salesforce.stackexchange.com/q/925/450">updated version of this question</a> on the <a href="https://salesforce.stackexchange.com/">Salesforce Stack Exchange</a>. </p>