DIT: Application-Level Support For Dynamic Extension and Flexible Composition Albert Serra, Nacho Navarro, Toni Cortes
DIT: Application-Level Support For Dynamic Extension and Flexible Composition Albert Serra, Nacho Navarro, Toni Cortes
Replace
check_registration_code()
with
{ return true; }
!!!
NEEDED MODULES
REFERENCE REFERENCE
RESOLUTION RESOLUTION
CONFIGURATION
EXECUTION EXTENSION
EXTENSIONS
EXECUTION
TERMINATION
Dynamic data
original definition
control flow
reference
A) DEFAULT BINDING
B) OVERRIDING
C) INTERPOSITION
Binding
Needed code
WRAPPER MODE CALLBACK MODE
Extension code
WRAPPER DISPATCHER
SERVICE INTERFACE
SERVICE INTERFACE
CALLBACK INTERFACE(S)
CALLBACK HANDLERS
Gunter Kniesel
public class DM {
// ... private data, constructor ...
int amount() { return ... }
void foo() { ... self.amount() ... }
}
// constructor:
DMtoEURO(DM p) { parent = p }
//redefined method:
int amount() { return parent.amount()
// forwarding method:
void foo() { parent.foo() }
}
Program Adaptation p.19/22
Example (cont)
// constructor:
DMtoEURO(DM p) { parent = p }
//redefined method:
int amount() { return parent.amount()
// forwarding method:
void foo() { parent.foo() }
}
Program Adaptation p.20/22
Delegation