boolean (@NotNull UElement element) { UClass containingClass = UastUtils.getContainingUClass(element); if (containingClass == null) return false; if (isNonNlsAnnotated(containingClass)) return true; //TODO potential performance issue here, cache classes? UClass superClass = containingClass; while ((superClass = superClass.getSuperClass()) != null) { if (isNonNlsAnnotated(superClass)) return true; } return false; }