"with index %s and pattern %s",
mGen.getName(), methodIdx,
joinpointPattern.pattern() );
// install the wrapper to the method
CallWrapperMethodPatcher mp =
new CallWrapperMethodPatcher(
methodIdx.intValue(), mGen, constPoolGen,
joinpointPattern.pattern(), targets );
// install the advice to the wrapper
cWrapper.install( (BeforeAfterAdvice)advice );
// create mapping: method->joinpointPattern->wrapper
callWrappers.get( methodIdx ).put(
joinpointPattern.pattern(), cWrapper );
// get the new method and replace the old version
targetClass.getMethods()[methodIdx.intValue()] =
mp.install();
// and update the class because of this change
targetClass.setConstantPool(
constPoolGen.getFinalConstantPool() );
}