private static @Nullable PsiField getField(@NotNull PsiElement element) {
    if (!(element instanceof PsiIdentifier)) return null;
    final PsiField field = PsiTreeUtil.getParentOfType(element, PsiField.class);
    if (field == null) return null;
    if (field.getLanguage() != JavaLanguage.INSTANCE) return null;
    if (field.getTypeElement() == null) return null;
    if (field.hasModifierProperty(PsiModifier.STATIC) || field.hasModifierProperty(PsiModifier.FINAL)) return null;
    return field;
  }
private static @Nullable PsiField getField(@NotNull PsiElement element)