int (PsiField[] fields) { int count = 0; for (PsiField field : fields) { if (!field.hasModifierProperty(PsiModifier.STATIC)) { return -1; } if (field.hasModifierProperty(PsiModifier.PRIVATE)) { continue; } count++; } return count; }