users@jaxb.java.net

Re: Adding javadoc to methods

From: Sekhar Vajjhala <sekhar.vajjhala_at_sun.com>
Date: Wed, 09 Jul 2003 06:09:06 -0400

Hank Ratzesberger wrote:

> Is there an example of adding javadoc to the methods
> created from, for example, a complex type with a
> sequence of elements (for which get/set methods are
> created)?
>
> The specification (6.11.1) says that there are package, class,
> method and field sections, but the external binding example only
> demonstrates the <class> section. When I use <jxb:method>
> in an external bindings file in a way similar to <jxb:class>,
> I get the error message that
> "jxb:method" is not allowed. Possible tag names are: <class>,<dom>....
>

The <jxb:method> is not a valid JAXB customization tag. The "method
section" is for purposes of the specification only as noted in the spec.
It is defined once in 6.11.1 and reference from elsewhere in chapter 6.

To add javadoc to a property, use the <javadoc> in a <property>
customization ( see section 6.8.1) i.e.

<property>
   ....
   <javadoc> ...</javadoc>
</property>

The spec requires that the javadoc be applied to only the getter method.

Sekhar Vajjhala
Sun Microsystems