No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Package javax. xml. bind. annotation

Defines annotations for customizing Java program elements to XML Schema mapping.

See: Description

Package javax.xml.bind.annotation Description

Defines annotations for customizing Java program elements to XML Schema mapping.

Package Specification

The following table shows the JAXB mapping annotations that can be associated with each program element.

Program Element JAXB annotation
Package
XmlAccessorOrder
XmlAccessorType
XmlSchema
XmlSchemaType
XmlSchemaTypes
XmlJavaTypeAdapter
XmlJavaTypeAdapters

javax.xml.bind.annotation (Java Platform SE 7 ) Home of API Java Contents Haut

Class
XmlAccessorOrder
XmlAccessorType
XmlInlineBinaryData
XmlRootElement
XmlType
XmlJavaTypeAdapter

javax.xml.bind.annotation (Java Platform SE 7 ) Home of API Java Contents Haut

Enum type
XmlEnum
XmlEnumValue (enum constant only)
XmlRootElement
XmlType
XmlJavaTypeAdapter

javax.xml.bind.annotation (Java Platform SE 7 ) Home of API Java Contents Haut

JavaBean Property/field
XmlElement
XmlElements
XmlElementRef
XmlElementRefs
XmlElementWrapper
XmlAnyElement
XmlAttribute
XmlAnyAttribute
XmlTransient
XmlValue
XmlID
XmlIDREF
XmlList
XmlMixed
XmlMimeType
XmlAttachmentRef
XmlInlineBinaryData
XmlElementDecl (only on method)
XmlJavaTypeAdapter

javax.xml.bind.annotation (Java Platform SE 7 ) Home of API Java Contents Haut

Parameter
XmlList
XmlAttachmentRef
XmlMimeType
XmlJavaTypeAdapter

javax.xml.bind.annotation (Java Platform SE 7 ) Home of API Java Contents Haut

javax.xml.bind.annotation (Java Platform SE 7 ) Home of API Java Contents Haut

Terminology

JavaBean property and field: For the purposes of mapping, there is no semantic difference between a field and a JavaBean property. Thus, an annotation that can be applied to a JavaBean property can always be applied to a field. Hence in the Javadoc documentation, for brevity, the term JavaBean property or property is used to mean either JavaBean property or a field. Where required, both are explicitly mentioned.

top level class: For the purpose of mapping, there is no semantic difference between a top level class and a static nested class. Thus, an annotation that can be applied to a top level class, can always be applied to a nested static class. Hence in the Javadoc documentation, for brevity, the term "top level class" or just class is used to mean either a top level class or a nested static class.

mapping annotation:A JAXB 2.0 defined program annotation based on the JSR 175 programming annotation facility.

Common Usage Constraints

The following usage constraints are defined here since they apply to more than annotation:

  • For a property, a given annotation can be applied to either read or write property but not both.
  • A property name must be different from any other property name in any of the super classes of the class being mapped.
  • A mapped field name or the decapitalized name of a mapped property must be unique within a class.

Notations

Namespace prefixes

The following namespace prefixes are used in the XML Schema fragments in this package.

Prefix Namespace Notes
xs http://www.w3.org/2001/XMLSchema Namespace of XML Schema namespace
ref http://ws-i.org/profiles/basic/1.1/xsd Namespace for swaref schema component
xsi http://www.w3.org/2001/XMLSchema-instance XML Schema namespace for instances

javax.xml.bind.annotation (Java Platform SE 7 ) Home of API Java Contents Haut

Since:
JAXB 2.0
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph