private static String[] getPropertiesHandlersNames(PsiClass psiClass,
                                                     boolean staticContext,
                                                     PsiType varType,
                                                     PsiElement element) {
    List<String> propertyHandlers = new ArrayList<>();

    for (PsiField field : psiClass.getFields()) {
      if (field == element) continue;
      if (StringUtil.isEmpty(field.getName())) continue;

      PsiUtilCore.ensureValid(field);
      PsiType fieldType = field.getType();
      PsiUtil.ensureValidType(fieldType);

      PsiModifierList modifierList = field.getModifierList();
      if (staticContext && modifierList != null && !modifierList.hasModifierProperty(PsiModifier.STATIC)) continue;

      if (fieldType.equals(varType)) {
        String getterName = JavaPsiRecordUtil.getComponentForField(field) != null ?
                                  field.getName() : PropertyUtilBase.suggestGetterName(field);
        if (psiClass.findMethodsByName(getterName, true).length == 0 ||
             psiClass.findMethodBySignature(GenerateMembersUtil.generateGetterPrototype(field), true) == null) {
          propertyHandlers.add(getterName);
        }
      }

      if (PsiTypes.voidType().equals(varType)) {
        String setterName = PropertyUtilBase.suggestSetterName(field);
        if (psiClass.findMethodsByName(setterName, true).length == 0 ||
             psiClass.findMethodBySignature(GenerateMembersUtil.generateSetterPrototype(field), true) == null) {
          propertyHandlers.add(setterName);
        }
      }
    }

    return ArrayUtilRt.toStringArray(propertyHandlers);
  }
private static String[] getPropertiesHandlersNames(PsiClass psiClass,
                                                     boolean staticContext,
                                                     PsiType varType,
                                                     PsiElement element)