} catch (CheckedAnalysisException e) {
AnalysisContext.logError("Problem resolving class for " + xmethod, e);
}
}
AnnotatedObject o = xmethod;
while (true) {
if (o == null) {
return null;
}
if (stopAtMethodScope && o instanceof XClass) {
return null;
}
// Check for direct type qualifier annotation
Set<TypeQualifierAnnotation> applications = new HashSet<TypeQualifierAnnotation>();
getDirectApplications(applications, o, ElementType.PARAMETER);
TypeQualifierAnnotation tqa = findMatchingTypeQualifierAnnotation(applications, typeQualifierValue);
if (tqa != null) {
// Found matching annotation in outer scope
assert false : "I think this code is dead; it shouldn't find anything";
return tqa;
}
// Check for default annotation
tqa = getDefaultAnnotation(o, typeQualifierValue, ElementType.PARAMETER);
if (tqa != null) {
if (DEBUG) {
System.out.println("Found default of " + tqa + " @ " + o);
}
return tqa;
}
if (stopAtClassScope && o instanceof XClass) {
return null;
}
o = o.getContainingScope();
}
}