javax.xml.bind

Class Unmarshaller.Listener

  • Enclosing interface:
    Unmarshaller

    public abstract static class Unmarshaller.Listener
    extends Object

    Register an instance of an implementation of this class with Unmarshaller to externally listen for unmarshal events.

    This class enables pre and post processing of an instance of a JAXB mapped class as XML data is unmarshalled into it. The event callbacks are called when unmarshalling XML content into a JAXBElement instance or a JAXB mapped class that represents a complex type definition. The event callbacks are not called when unmarshalling to an instance of a Java datatype that represents a simple type definition.

    External listener is one of two different mechanisms for defining unmarshal event callbacks. See Unmarshal Event Callbacks for an overview.

    (@link #setListener(Listener)} (@link #getListener()}

    Since:
    JAXB2.0
    • Constructor Detail

      • Unmarshaller.Listener

        public Unmarshaller.Listener()
    • Method Detail

      • beforeUnmarshal

        public void beforeUnmarshal(Object target,
                           Object parent)

        Callback method invoked before unmarshalling into target.

        This method is invoked immediately after target was created and before the unmarshalling of this object begins. Note that if the class of target defines its own beforeUnmarshal method, the class specific callback method is invoked before this method is invoked.

        Parameters:
        target - non-null instance of JAXB mapped class prior to unmarshalling into it.
        parent - instance of JAXB mapped class that will eventually reference target. null when target is root element.
      • afterUnmarshal

        public void afterUnmarshal(Object target,
                          Object parent)

        Callback method invoked after unmarshalling XML data into target.

        This method is invoked after all the properties (except IDREF) are unmarshalled into target, but before target is set into its parent object. Note that if the class of target defines its own afterUnmarshal method, the class specific callback method is invoked before this method is invoked.

        Parameters:
        target - non-null instance of JAXB mapped class prior to unmarshalling into it.
        parent - instance of JAXB mapped class that will reference target. null when target is root element.

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/Unmarshaller.Listener.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