有没有办法获得像ConstructorProperties这样的注释,它@Target(CONSTRUCTOR)
必须注释生成的 java 16 记录的构造函数?例如:
@ConstructorProperties({"id", "filename"})
public record Person(long id, String filename) {}
此 ^ 导致以下错误:
java: annotation type not applicable to this kind of declaration