Java Properties and Fields
Java Properties and Fields
TABLE 175
JAXB Annotations Associated with a Java enum Type
(Continued)
Annotation
Description and Default Setting
@XmlRootElement
Associates a global element with the schema type to which the class is mapped. Default
Settings:
@XmlRootElement (
name =
"##default",
namespace =
"##default"
)
summarizes JAXB annotations that can be used with Java properties and fields.
TABLE 176
JAXB Annotations Associated with Java Properties and Fields
Annotation
Description and Default Setting
@XmlElement
Maps a JavaBeans property/field to an XML element derived from a property/field
name. Default Settings:
@XmlElement (
name =
"##default",
nillable = false,
namespace =
"##default",
type = DEFAULT.class,
defaultValue =
"\u0000"
)
@XmlElements
A container annotation for defining multiple @XmlElement annotations. Default
Settings:
None
@XmlElementRef
Maps a JavaBeans property/field to an XML element derived from a
property/field's type. Default Settings:
@XmlElementRef (
name =
"##default",
namespace =
"##default",
type = DEFAULT.class
)
@XmlElementRefs
A container annotation for defining multiple @XmlElementRef annotations.
Default Settings:
None
Customizing Generated Classes and Java Program Elements
The Java EE 5 Tutorial · September 2007
498