private static boolean isGetter(PsiExpression returnValue, PsiElement containingMethod) {
    if (returnValue instanceof PsiReferenceExpression) {
      final PsiElement resolved = ((PsiReferenceExpression)returnValue).resolve();
      if (resolved instanceof PsiField field) {
        final boolean isStatic = field.hasModifierProperty(PsiModifier.STATIC);
        final PsiMethod[] getters = GetterSetterPrototypeProvider.findGetters(field.getContainingClass(), field.getName(), isStatic);
        if (getters != null) {
          for (PsiMethod getter : getters) {
            if (containingMethod.isEquivalentTo(getter)) {
              return true;
            }
          }
        }
      }
    }
    return false;
  }
private static boolean isGetter(PsiExpression returnValue, PsiElement containingMethod)