Is invoked when base-level method invocation is intercepted.
This method simply executes the intercepted method invocation
with the original parameters and returns the resulting value.
Every subclass of this class should redefine this method.
Note: this method is not invoked if the base-level method
is invoked by a constructor in the super class. For example,
abstract class A {
abstract void initialize();
A() {
initialize(); // not intercepted
}
}
class B extends A {
void initialize() { System.out.println("initialize()"); }
B() {
super();
initialize(); // intercepted
}
}
if an instance of B is created,
the invocation of initialize() in B is intercepted only once.
The first invocation by the constructor in A is not intercepted.
This is because the link between a base-level object and a
metaobject is not created until the execution of a
constructor of the super class finishes.
|