public abstract static class Marshaller.Listener extends Object
Marshallerto 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 and Description|
|Modifier and Type||Method and Description|
Callback method invoked after marshalling source to XML.
Callback method invoked before marshalling from source to XML.
public void beforeMarshal(Object source)
source- instance of JAXB mapped class prior to marshalling from it.
public void afterMarshal(Object source)
source- instance of JAXB mapped class after marshalling it.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.