This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.xml.bind
class Unmarshaller.Listener

java.lang.Object extended by javax.xml.bind.Unmarshaller.Listener
Enclosing class:
Unmarshaller

public abstract static class Unmarshaller.Listener
extends Object

Register an instance of an implementation of this class with {@link 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()}


Constructor Summary

          
 
Method Summary
 void
afterUnmarshal(Object target, Object parent)

          

Callback method invoked after unmarshalling XML data into target.

 void
beforeUnmarshal(Object target, Object parent)

          

Callback method invoked before unmarshalling into target.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Unmarshaller.Listener

public Unmarshaller.Listener()
Method Detail

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.

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.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.