Is there a way to get an annotation like ConstructorProperties that has @Target(CONSTRUCTOR)
to annotate the generated constructor of a java 16 record? E.g.:
@ConstructorProperties({"id", "filename"})
public record Person(long id, String filename) {}
This ^ causes the following error:
java: annotation type not applicable to this kind of declaration
This worked:
My understanding is that the inner constructor with no parameter list is a way of adding logic to the default constructor created using the component list. Apparently, adding a constructor annotation to that has the end result I was after :)