Table 16-6 JAXB Annotations Associated with Java Properties and Fields
Annotation
|
Description and Default Setting
|
@XmlElement
|
Maps a JavaBean property/field to a 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 JavaBean property/field to a 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
|
@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 JavaBean property to an XML infoset representation and/or JAXB element
Default Settings:
@XmlAnyElement ( lax = false, value = W3CDomHandler.class )
|
@XmlAttribute
|
Maps a JavaBean property to a XML attribute
Default Settings:
@XmlAttribute ( name = ##default, required = false, namespace = "##default" )
|
@XmlAnyAttribute
|
Maps a JavaBean property to a map of wildcard attributes
Default Settings:
None
|
@XmlTransient
|
Prevents the mapping of a JavaBean property to XML representation
Default Settings:
None
|
@XmlValue
|
Defines mapping a class to a XML Schema complex type with a simpleContent or a XML Schema simple type
Default Settings:
None
|
@XmlID
|
Maps a JavaBean property to XML ID
Default Settings:
None
|
@XmlIDREF
|
Maps a JavaBean property to XML IDREF
Default Settings:
None
|
@XmlList
|
Used to map a property to a list simple type
Default Settings:
None
|
@XmlMixed
|
Mark a JavaBean multi-valued property to support mixed content
Default Settings:
None
|
@XmlMimeType
|
Associates the MIME type that controls the XML representation of the property
Default Settings:
None
|
@XmlAttachmentRef
|
Marks a field/property that its XML form is a uri reference to mime content
Default Settings:
None
|
@XmlInlineBinaryData
|
Disables consideration of XOP encoding for datatypes that are bound to base64-encoded binary data in XML
Default Settings:
None
|
@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 )
|