XmlAdapter for custom marshaling.
Usage:
The @XmlJavaTypeAdapter annotation can be used with the
following program elements:
XmlJavaTypeAdapters When @XmlJavaTypeAdapter annotation is defined on a
class, it applies to all references to the class.
When @XmlJavaTypeAdapter annotation is defined at the
package level it applies to all references from within the package
to @XmlJavaTypeAdapter.type().
When @XmlJavaTypeAdapter annotation is defined on the
field, property or parameter, then the annotation applies to the
field, property or the parameter only.
A @XmlJavaTypeAdapter annotation on a field, property
or parameter overrides the @XmlJavaTypeAdapter annotation
associated with the class being referenced by the field, property
or parameter.
A @XmlJavaTypeAdapter annotation on a class overrides
the @XmlJavaTypeAdapter annotation specified at the
package level for that class.
This annotation can be used with the following other annotations:
XmlElement, XmlAttribute, XmlElementRef,
XmlElementRefs, XmlAnyElement. This can also be
used at the package level with the following annotations:
XmlAccessorType, XmlSchema, XmlSchemaType,
XmlSchemaTypes.
Example: See example in XmlAdapter
XmlAdapter
| Modifier and Type | Class and Description |
|---|---|
| public static class | XmlJavaTypeAdapter.DEFAULT
Used in |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public Class |
| type | back to summary |
|---|---|
| public Class If this annotation is used at the package level, then value of the type() must be specified. | |
| value | back to summary |
|---|---|
| public Class Points to the class that converts a value type to a bound type or vice versa.
See | |
XmlJavaTypeAdapter#type() to
signal that the type be inferred from the signature
of the field, property, parameter or the class.
| Access | Constructor and Description |
|---|---|
| public |
| DEFAULT | back to summary |
|---|---|
| public DEFAULT() | |