XDoclet

{{Short description|Java Attribute-oriented Library}}

{{Infobox Software

| name = XDoclet

| logo =

| screenshot =

| caption =

| collapsible =

| developer =

| latest_release_version = 1.2.3

| latest_release_date = {{release date|2005|05|05}}

| latest_preview_version =

| latest_preview_date =

| operating_system = Cross-platform

| programming_language = Java

| genre = Attribute-Oriented Programming for Java

| license = BSD license

| website = {{URL|xdoclet.sourceforge.net/xdoclet/}}
{{URL|https://web.archive.org/web/20080314051510/http://xdoclet.codehaus.org/}}}}

XDoclet is an open-source code generation library that enables Attribute-oriented programming for Java via insertion of special Javadoc tags.{{Cite book |last=Walls |first=Craig |title=XDoclet in Action |last2=Richards |first2=Norman |publisher=Manning Publications |isbn=978-1932394054 |publication-date=December 1, 2003 |pages=4-5 |language=en}} It comes with a library of predefined tags, which simplify coding for various technologies: Java EE, Web services, Portlet etc.

Example

A typical XDoclet comment might look like this:

/****

* 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"

* schema = "Customers"

*

* @ejb.finder

* signature="java.util.Collection findAll()"

* unchecked="true"

*

* @ejb.finder signature="java.util.Collection findByName(java.lang.String name)"

* unchecked="true"

* query= "SELECT OBJECT(o) FROM Customers AS o WHERE o.name

* LIKE ?1"

*

* @ejb.transaction

* type="Required"

*

* @ejb.interface

* remote-class="test.interfaces.Account"

*

* @ejb.value-object

* match="*"

*

* @version 1.5

*/

References

{{Reflist}}