boolean (@NotNull PsiClass aClass, @NotNull PsiField field, boolean fieldStatic, @NotNull Predicate<? super PsiField> condition) { PsiField[] fields = aClass.getFields(); for (PsiField psiField : fields) { if (psiField != field && psiField.hasModifierProperty(PsiModifier.STATIC) == fieldStatic && variableDefinitelyAssignedIn(field, psiField) && condition.test(psiField)) { return true; } } return false; }