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 Marshaller.Listener

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

public abstract static class Marshaller.Listener
extends Object

Register an instance of an implementation of this class with a {@link Marshaller} to externally listen for marshal events.

This class enables pre and post processing of each marshalled object. The event callbacks are called when marshalling from an instance that maps to an xml element or complex type definition. The event callbacks are not called when marshalling from an instance of a Java datatype that represents a simple type definition.

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


Constructor Summary

          
 
Method Summary
 void

          

Callback method invoked after marshalling source to XML.

 void

          

Callback method invoked before marshalling from source to XML.

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

Constructor Detail

Marshaller.Listener

public Marshaller.Listener()
Method Detail

afterMarshal

public void afterMarshal(Object source)

Callback method invoked after marshalling source to XML.

This method is invoked after source and all its descendants have been marshalled. Note that if the class of source defines its own afterMarshal method, the class specific callback method is invoked just before this method is invoked.

Parameters:
source - instance of JAXB mapped class after marshalling it.

beforeMarshal

public void beforeMarshal(Object source)

Callback method invoked before marshalling from source to XML.

This method is invoked just before marshalling process starts to marshal source. Note that if the class of source defines its own beforeMarshal method, the class specific callback method is invoked just before this method is invoked.

Parameters:
source - instance of JAXB mapped class prior to marshalling from it.


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