boolean (UExpression body) { var visitor = new AbstractUastVisitor() { boolean myHasAccessibilityMethodCall = false; private static boolean isAccessibilityMethod(@NotNull UCallExpression call) { if (call.isMethodNameOneOf(List.of("setAccessibleName", "setAccessibleDescription"))) { return true; } PsiMethod target = call.resolve(); if (target != null) { PsiClass aClass = target.getContainingClass(); if (aClass != null && "com.intellij.util.ui.accessibility.AccessibleContextUtil".equals(aClass.getQualifiedName())) { return true; } } return false; } @Override public boolean visitCallExpression(@NotNull UCallExpression call) { if (isAccessibilityMethod(call)) { myHasAccessibilityMethodCall = true; return false; } return true; } }; body.accept(visitor); return visitor.myHasAccessibilityMethodCall; }