public static @Nullable PsiRecordComponent getRecordComponentForAccessor(@NotNull PsiMethod accessor) {
    PsiClass aClass = accessor.getContainingClass();
    if (aClass == null) {
      PsiElement parent = accessor.getParent();
      if (parent instanceof DummyHolder) {
        aClass = ObjectUtils.tryCast(parent.getContext(), PsiClass.class);
      }
    }
    if (aClass == null || !aClass.isRecord()) return null;
    if (!accessor.getParameterList().isEmpty()) return null;
    String name = accessor.getName();
    for (PsiRecordComponent c : aClass.getRecordComponents()) {
      if (name.equals(c.getName())) {
        return c;
      }
    }
    return null;
  }
public static @Nullable PsiRecordComponent getRecordComponentForAccessor(@NotNull PsiMethod accessor)