public static boolean isExplicitCanonicalConstructor(@NotNull PsiMethod method) {
    if (!method.isConstructor() || isCompactConstructor(method)) return false;
    if (method instanceof SyntheticElement) return false;
    PsiClass aClass = method.getContainingClass();
    if (aClass == null || !aClass.isRecord()) return false;
    return hasCanonicalSignature(method, aClass.getRecordComponents());
  }
public static boolean isExplicitCanonicalConstructor(@NotNull PsiMethod method)