org.castor.xml
Class UnmarshalListenerAdapter

java.lang.Object
  extended by org.castor.xml.UnmarshalListenerAdapter
All Implemented Interfaces:
UnmarshalListener

public class UnmarshalListenerAdapter
extends java.lang.Object
implements UnmarshalListener

This class is responsible to adapt from new (1.2) UnmarshalListener interface to calls into the old interface.
The old interface has been marked as deprecated but will be supported for some Castor releases to come. When the deprecated interface will be removed also this adapter implementation is useless and should be removed.

Version:
$Revision$
Author:
Joachim Grueneis, jgrueneis AT codehaus DOT org

Constructor Summary
UnmarshalListenerAdapter()
          Empty default constructor.
 
Method Summary
 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 setOldListener(UnmarshalListener exolabListener)
          To set an 'old style' unmarshal listener to receive the callback calls.
 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnmarshalListenerAdapter

public UnmarshalListenerAdapter()
Empty default constructor.

Method Detail

setOldListener

public void setOldListener(UnmarshalListener exolabListener)
To set an 'old style' unmarshal listener to receive the callback calls.

Parameters:
exolabListener - the 'old style' unmarshal listener

attributesProcessed

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

Specified by:
attributesProcessed in interface UnmarshalListener
Parameters:
target - the Object the object being unmarshalled.
parent - the parent of the target being unmarshalled
See Also:
UnmarshalListener.attributesProcessed(java.lang.Object, java.lang.Object)

fieldAdded

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

Specified by:
fieldAdded in interface UnmarshalListener
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.
See Also:
UnmarshalListener.fieldAdded(java.lang.String, java.lang.Object, java.lang.Object)

initialized

public void initialized(java.lang.Object target,
                        java.lang.Object parent)
This method is called when an object has just been initialized by the Unmarshaller.

Specified by:
initialized in interface UnmarshalListener
Parameters:
target - the Object that was initialized.
parent - the parent of the target that was initialized
See Also:
UnmarshalListener.initialized(java.lang.Object, java.lang.Object)

unmarshalled

public 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).

Specified by:
unmarshalled in interface UnmarshalListener
Parameters:
target - the Object that was unmarshalled.
parent - the parent of the target that was unmarshalled
See Also:
UnmarshalListener.unmarshalled(java.lang.Object, java.lang.Object)


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com