It would be helpful to have methods on `Elements` to determine if the constructor for a method is either a compact constructor or a canonical constructor. Both terms are defined for records in JLS 8.10.4
For example,
boolean Elements isCompactConstructor(ExecutableElement ee);
boolean Elements isCanonicalConstructor(ExecutableElement ee);
It is not directly possible in the Language Model world to determine if a constructor is a compact constructor (unless it is maybe defined that the parameters are MANDATED). The test for a canonical constructor is moderately expensive and involves looping over the parameters checking the name and type against the corresponding value for each component. Meanwhile, internally, `javac` knows there to both queries, encoded in `Flags.RECORD` and `Flags.COMPACT_RECORD_CONSTRUCTOR`, both defined for `MethodSymbol`.