PsiField (@NotNull PsiRecordComponent component) { PsiClass aClass = component.getContainingClass(); if (aClass == null) return null; String name = component.getName(); for (PsiField field : aClass.getFields()) { if (field.getName().equals(name) && !field.hasModifierProperty(PsiModifier.STATIC)) { return field; } } return null; }