jef.disconnection.impl
Class DefaultFieldDisconnector

java.lang.Object
  extended by jef.disconnection.impl.DefaultFieldDisconnector
All Implemented Interfaces:
Disconnector, FieldDisconnector

public class DefaultFieldDisconnector
extends java.lang.Object
implements FieldDisconnector

Default implementation of the FieldDisconnector interface.

Author:
frusso@dev.java.net

Constructor Summary
DefaultFieldDisconnector()
          Creates a new instance of DefaultFieldDisconnector
 
Method Summary
 void extract(FieldInfoStructure fieldInfo, DisconnectedField disconnectedField, DeepCopier deepCopier)
          This method copies into the disconnectField instance provided as parameter the fieldInfo object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFieldDisconnector

public DefaultFieldDisconnector()
Creates a new instance of DefaultFieldDisconnector

Method Detail

extract

public void extract(FieldInfoStructure fieldInfo,
                    DisconnectedField disconnectedField,
                    DeepCopier deepCopier)
             throws DisconnectionFailedException
This method copies into the disconnectField instance provided as parameter the fieldInfo object. Actually this is a real copy, that is the source fieldInfo gets cloned and all its references to cp_infos entries are correctly updated.
What this means is that the copy of a field from a source Dna to a target DisconnectField data structure entails a deep copy of all the referenced cp_infos. This is a required step to bring into the target DisconnectedField all the other information on which the field definition is based.

Note: if using a stateful deep copier it is fundamental to perform all the deep copy invocations by means of the same DeepCopier instance.

Specified by:
extract in interface FieldDisconnector
Parameters:
fieldInfo - The reference to the field to be copied into the target disconnectMethod
disconnectField - The target DisconnectedField instance in which the disconnected method will be stored for a subsequent injection
deepCopier - The DeepCopier instance needed to perform the deep copy operation
Throws:
DisconnectionFailedException