}
}
private void validateOrBranch(OrPointcut pc, Pointcut userPointcut, int numFormals, String[] names, Pointcut[] leftBindings,
Pointcut[] rightBindings) {
Pointcut left = pc.getLeft();
Pointcut right = pc.getRight();
if (left instanceof OrPointcut) {
Pointcut[] newRightBindings = new Pointcut[numFormals];
validateOrBranch((OrPointcut) left, userPointcut, numFormals, names, leftBindings, newRightBindings);
} else {
if (left.couldMatchKinds() != Shadow.NO_SHADOW_KINDS_BITS) {
validateSingleBranch(left, userPointcut, numFormals, names, leftBindings);
}
}
if (right instanceof OrPointcut) {
Pointcut[] newLeftBindings = new Pointcut[numFormals];
validateOrBranch((OrPointcut) right, userPointcut, numFormals, names, newLeftBindings, rightBindings);
} else {
if (right.couldMatchKinds() != Shadow.NO_SHADOW_KINDS_BITS) {
validateSingleBranch(right, userPointcut, numFormals, names, rightBindings);
}
}
int kindsInCommon = left.couldMatchKinds() & right.couldMatchKinds();
if (kindsInCommon != Shadow.NO_SHADOW_KINDS_BITS && couldEverMatchSameJoinPoints(left, right)) {
// we know that every branch binds every formal, so there is no
// ambiguity
// if each branch binds it in exactly the same way...
List<String> ambiguousNames = new ArrayList<String>();