background image

JCustomization Namespace Prefix

<< Typesafe Enumeration Binding Declarations | Customize Inline Example >>
<< Typesafe Enumeration Binding Declarations | Customize Inline Example >>
48
U
SING
JAXB
For inline annotations, the
<typesafeEnumClass>
declaration must be specified
in the annotation element of the
<simpleType>
element. The
<typesafeEnum-
Member>
must be specified in the annotation element of the enumeration mem-
ber. This allows the enumeration member to be customized independently from
the enumeration class.
For information about typesafe enum design patterns, see the sample chapter of
Joshua Bloch's Effective Java Programming on the Java Developer Connection.
<javadoc> Binding Declarations
The
<javadoc>
declaration lets you add custom Javadoc tool annotations to
schema-derived JAXB packages, classes, interfaces, methods, and fields. Note
that
<javadoc>
declarations cannot be applied globally--that is, they are only
valid as a sub-elements of other binding customizations.
The syntax for the
<javadoc>
customization is:
<javadoc>
Contents in &lt;b>Javadoc&lt;\b> format.
</javadoc>
or
<javadoc>
<<![CDATA[
Contents in <b>Javadoc<\b> format
]]>
</javadoc>
Note that documentation strings in
<javadoc>
declarations applied at the pack-
age level must contain
<body>
open and close tags; for example:
<jxb:package name="primer.myPo">
<jxb:javadoc><![CDATA[<body>Package level documentation
for generated package primer.myPo.</body>]]>
</jxb:javadoc>
</jxb:package>
Customization Namespace Prefix
All standard JAXB binding declarations must be preceded by a namespace prefix
that maps to the JAXB namespace URI (
http://java.sun.com/xml/ns/jaxb
).
For example, in this sample,
jxb:
is used. To this end, any schema you want to