boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiClass @NotNull [] classes, @NotNull Condition<? super String> nameCondition) { for (PsiClass aClass : classes) { String name = aClass.getName(); if (name != null && nameCondition.value(name)) { try { if (!processor.execute(aClass, state)) return false; } catch (ProcessCanceledException | IndexNotReadyException e) { throw e; } catch (Exception e) { LOG.error(e); } } } return true; }