jef.disconnection
Interface MethodDisconnector
- All Superinterfaces:
- Disconnector
- All Known Implementing Classes:
- DefaultMethodDisconnector
public interface MethodDisconnector
- extends Disconnector
This interface defines the contract every concrete class responsible of extracting a method's
definition from a Java class has to adhere to.
- Author:
- frusso@dev.java.net
extract
void extract(MethodInfoStructure methodInfo,
Dna srcDna,
DisconnectedMethod disconnectedMethod)
throws DisconnectionFailedException
- This method copies into the
disconnectMethod
instance provided as parameter
the methodInfo
object. Actually this is a real copy, that is the source
methodInfo
gets cloned and all its references to cp_info
s
entries are correctly updated.
What this means is that the copy of a method from a source Dna
to a target
DisconnectMethod
data structure entails that a deep copy of all the referenced
cp_info
s will be launched. This is a required step to bring into the target
DisconnectedMethod
all the other information on which the method 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.
- Parameters:
methodInfo
- The reference to the method to be copied into the target
disconnectMethod
srcDna
- The Dna
instance the methodInfo
belongs todisconnectMethod
- The target DisconnectedMethod
instance in which the disconnected
method will be stored for a subsequent injection
- Throws:
DisconnectionFailedException