Package org.castor.xml
Interface UnmarshalListener
-
- All Known Implementing Classes:
MappingUnmarshallListener
,UnmarshalListenerAdapter
,UnmarshalListenerDelegate
public interface UnmarshalListener
An interface to allow external "listening" to objects when they are being unmarshalled for various tracking purposes and potential modification. An implementation of this interface may be registered with the Unmarshaller.
This is already a new version of this interface with enhanced callback methods. The orginial implementation still exists but is deprecatedUnmarshalListener
. The UnmarshalListener interface does not report on native data types that are unmarshalled. The first definition of this interface was by Paul Christmann, Keith Visco and Arnaud Blandin.- Since:
- 1.2
- Version:
- $Revision$
- Author:
- Joachim Grueneis, jgrueneis AT codehaus DOT org
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
attributesProcessed(java.lang.Object target, java.lang.Object parent)
This method is called once the attributes have been processed.void
fieldAdded(java.lang.String fieldName, java.lang.Object parent, java.lang.Object child)
This method is called after a child object has been added during the unmarshalling.void
initialized(java.lang.Object target, java.lang.Object parent)
This method is called when an object has just been initialized by the Unmarshaller.void
unmarshalled(java.lang.Object target, java.lang.Object parent)
This method is called after an object has been completely unmarshalled, including all of its children (if any).
-
-
-
Method Detail
-
initialized
void initialized(java.lang.Object target, java.lang.Object parent)
This method is called when an object has just been initialized by the Unmarshaller.- Parameters:
target
- the Object that was initialized.parent
- the parent of the target that was initialized
-
attributesProcessed
void attributesProcessed(java.lang.Object target, java.lang.Object parent)
This method is called once the attributes have been processed. It indicates that the the fields of the given object corresponding to attributes in the XML document have been set.- Parameters:
target
- the Object the object being unmarshalled.parent
- the parent of the target being unmarshalled
-
fieldAdded
void fieldAdded(java.lang.String fieldName, java.lang.Object parent, java.lang.Object child)
This method is called after a child object has been added during the unmarshalling. This method will be called after#unmarshalled(Object)
has been called for the child.- Parameters:
fieldName
- The Name of the field the child is being added to.parent
- The Object being unmarshalled.child
- The Object that was just added.
-
unmarshalled
void unmarshalled(java.lang.Object target, java.lang.Object parent)
This method is called after an object has been completely unmarshalled, including all of its children (if any).- Parameters:
target
- the Object that was unmarshalled.parent
- the parent of the target that was unmarshalled
-
-