[SalesForce] How to write comments in APEX classes

I'm wondering if there is a standard to write comments in APEX ?

In order to pass the Security Review, I review my code. And I think writing good comments in APEX classes can help the reviewers to understand the code.

For example, if we want to generate the Javadoc, we have to do something like this :

/**
 * Returns an ...
 * <p>
 * This method ... 
 *
 * @param  name  the name ...
 * @return      the string ...
 */
 public String myMethod(String name) {
        ...
 }

So does any comment standard like the code above exist ?

And does a tool to generate the documentation exist ?

Best Answer

Apex2Doc is similar to JavaDoc. Not necessary for security review, I don't think. But useful for the next person to edit your code.