use of org.checkerframework.framework.qual.AnnotatedFor in project checker-framework by typetools.
the class SourceChecker method isAnnotatedForThisCheckerOrUpstreamChecker.
private boolean isAnnotatedForThisCheckerOrUpstreamChecker(@Nullable Element elt) {
if (elt == null || !useUncheckedCodeDefault("source")) {
return false;
}
@Nullable AnnotatedFor anno = elt.getAnnotation(AnnotatedFor.class);
String[] userAnnotatedFors = (anno == null ? null : anno.value());
if (userAnnotatedFors != null) {
List<String> upstreamCheckerNames = getUpstreamCheckerNames();
for (String userAnnotatedFor : userAnnotatedFors) {
if (CheckerMain.matchesCheckerOrSubcheckerFromList(userAnnotatedFor, upstreamCheckerNames)) {
return true;
}
}
}
return false;
}
Aggregations