Pointcut newP = rewriter.rewrite(p);
// validateBindings now whilst we still have around the pointcut
// that resembles what the user actually wrote in their program
// text.
if (munger instanceof Advice) {
Advice advice = (Advice) munger;
if (advice.getSignature() != null) {
final int numFormals;
final String names[];
// If the advice is being concretized in a @AJ aspect *and*
// the advice was declared in
// an @AJ aspect (it could have been inherited from a code
// style aspect) then
// evaluate the alternative set of formals. pr125699
if ((advice.getConcreteAspect().isAnnotationStyleAspect() && advice.getDeclaringAspect() != null && advice
.getDeclaringAspect().resolve(world).isAnnotationStyleAspect())
|| advice.isAnnotationStyle()) {
numFormals = advice.getBaseParameterCount();
int numArgs = advice.getSignature().getParameterTypes().length;
if (numFormals > 0) {
names = advice.getSignature().getParameterNames(world);
validateBindings(newP, p, numArgs, names);
}
} else {
numFormals = advice.getBaseParameterCount();
if (numFormals > 0) {
names = advice.getBaseParameterNames(world);
validateBindings(newP, p, numFormals, names);
}
}
}
}