jax-doclets allows you to generate JavaDoc documentation for specific Java annotation-based extensions such as:
This is done by implementing a custom doclet for each API which is then used by the traditional javadoc command to generate the documentation.
In the future we will be adding support for at least the following APIs:
You can see the JavaDoc files generated by our doclets on example APIs:
Once you have downloaded our doclets jar, simply use the following ant task:
<path id="compile.classpath">
<pathelement location=".../jax-doclets-0.7.jar"/>
</path>
<target name="jax-doc-jaxrs" description="Generate JAX-RS documentation">
<javadoc classpathref="compile.classpath" sourcepath="${src.dir}"
destdir="${build.dir}/jaxrsdocs/" extdirs="${lib.dir}"
doclet="com.lunatech.doclets.jax.jaxrs.JAXRSDoclet"
docletpathref="compile.classpath">
<link href="../jaxbdocs/"/>
</javadoc>
</target>
<target name="jax-doc-jaxb" description="Generate JAXB documentation">
<javadoc classpathref="compile.classpath" sourcepath="${src.dir}"
destdir="${build.dir}/jaxbdocs/" extdirs="${lib.dir}"
doclet="com.lunatech.doclets.jax.jaxb.JAXBDoclet"
docletpathref="compile.classpath">
</javadoc>
</target>
Here's an example of JavaDoc for JAX-RS:
/**
* This is our order resource
*/
@Path("/order")
@Produces("application/xml")
public class Order {
/**
* Gets a single order
* @param orderKey the order key
* @return the order if found
* @HTTP 404 order not found
*/
@GET
@Path("{id}")
public Order getOrder(@PathParam("id") String orderKey){…}
/**
* Gets every order
* @return every order
* @returnWrapped com.foo.OrderList
*/
@GET
public Response getOrders(){…}
/**
* Uploads an order
* @param order the order to upload
* @inputWrapped com.foo.Order
*/
@POST
public void postOrder(String orderAsString){…}
}
All documentation is available in the following formats:
You can download everything over on our Google Code project page.
Our source code repository is browsable on our Google Code project page.
Expect many, since this is pre-release quality.
In particular, the standard doclet options are not all used (most of them aren’t to be honest).
We will soon have a bug report tool available.
Copyright © 2005-2010, Lunatech Labs B.V. All rights reserved.