PsiElement (@NotNull PsiClass createdElement) { if (createdElement.isRecord()) { PsiRecordHeader header = createdElement.getRecordHeader(); if (header != null) { return header.getLastChild(); } } return createdElement.getLBrace(); }