javax.xml.bind.annotation.adapters

Annotation Type XmlJavaTypeAdapter


  • @Retention(value=RUNTIME)
    @Target(value={PACKAGE,FIELD,METHOD,TYPE,PARAMETER})
    public @interface XmlJavaTypeAdapter
    Use an adapter that implements XmlAdapter for custom marshaling.

    Usage:

    The @XmlJavaTypeAdapter annotation can be used with the following program elements:

    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

    Since:
    JAXB2.0
    See Also:
    XmlAdapter
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element and Description
      Class<? extends XmlAdapter> value
      Points to the clsss that converts a value type to a bound type or vice versa.

        

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element and Description
      Class type
      If this annotation is used at the package level, then value of the type() must be specified.

        

    • Element Detail

      • value

        public abstract Class<? extends XmlAdapter> value
        Points to the clsss that converts a value type to a bound type or vice versa. See XmlAdapter for more details.
      • type

        public abstract Class type
        If this annotation is used at the package level, then value of the type() must be specified.
        Default:
        javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT.class

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 11/06/2005, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut