background image

Wrapper Element

<< Java Properties and Fields | JavaBeans Multi-Valued Property >>
<< Java Properties and Fields | JavaBeans Multi-Valued Property >>

Wrapper Element

TABLE 17­6
JAXB Annotations Associated with Java Properties and Fields
(Continued)
Annotation
Description and Default Setting
@XmlElementWrapper
Generates a wrapper element around an XML representation. Typically a wrapper
XML element around collections. Default Settings:
@XmlElementWrapper (
name =
"##default",
namespace =
"##default",
nillable = false
)
@XmlAnyElement
Maps a JavaBeans property to an XML infoset representation and/or JAXB
element. Default Settings:
@XmlAnyElement (
lax = false,
value = W3CDomHandler.class
)
@XmlAttribute
Maps a JavaBeans property to an XML attribute. Default Settings:
@XmlAttribute (
name = ##default,
required = false,
namespace =
"##default"
)
@XmlAnyAttribute
Maps a JavaBeans property to a map of wildcard attributes. Default Settings:
None
@XmlTransient
Prevents the mapping of a JavaBeans property to an XML representation. Default
Settings:
None
@XmlValue
Defines mapping of a class to an XML Schema complex type with a
simpleContent
or an XML Schema simple type. Default Settings:
None
@XmlID
Maps a JavaBeans property to an XML ID. Default Settings:
None
@XmlIDREF
Maps a JavaBeans property to an XML IDREF. Default Settings:
None
@XmlList
Maps a property to a list simple type. Default Settings:
None
Customizing Generated Classes and Java Program Elements
Chapter 17 · Binding between XML Schema and Java Classes
499