XDoclet
Encyclopedia
XDoclet is an open-source code generation library that enables Attribute-oriented programming
Attribute-Oriented Programming
Attribute-oriented programming is a program-level marking technique. Programmers can mark program elements to indicate that they maintain application-specific or domain-specific semantics...

 for Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 via insertion of special Javadoc
Javadoc
Javadoc is a documentation generator from Sun Microsystems for generating API documentation in HTML format from Java source code.The "doc comments" format used by Javadoc is the de facto industry standard for documenting Java classes. Some IDEs, such as Netbeans and Eclipse automatically generate...

 tags. It comes with a library of predefined tags, which simplify coding for various technologies: Java EE, Web services, Portlet
Portlet
Portlets are pluggable user interface software components that are managed and displayed in a web portal. Portlets produce fragments of markup code that are aggregated into a portal. Typically, following the desktop metaphor, a portal page is displayed as a collection of non-overlapping 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
*/

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK