Example of code-driven generation

This is an example from the XDoclet project which uses code attribution (that's why they also call this attribute oriented programming) to generate EJB helper classes and functions.

/**
 * This is the Account entity bean. It is an example of how to use the
 * EJBDoclet tags.
 *
 * @see Customer
 *
 * @ejb.bean
 *     name="bank/Account"
 *     type="CMP"
 *     jndi-name="ejb/bank/Account"
 *     local-jndi-name="ejb/bank/LocalAccount"
 *     primkey-field="id"
 *
 * @ejb.finder
 *     signature="java.util.Collection findAll()"
 *     unchecked="true"
 *
 * @ejb.transaction
 *     type="Required"
 *
 * @ejb.interface
 *     remote-class="test.interfaces.Account"
 *
 * @ejb.value-object
 *     match="*"
 *
 * @version 1.5
 */

XDoclet will use this information to create the proper deployment descriptors etc.