public static boolean canDeclareThrownExceptions(@NotNull PsiMethod method) {
    return JavaPsiRecordUtil.getRecordComponentForAccessor(method) == null &&
           !JavaPsiRecordUtil.isCompactConstructor(method) &&
           !JavaPsiRecordUtil.isExplicitCanonicalConstructor(method);
  }
public static boolean canDeclareThrownExceptions(@NotNull PsiMethod method)