문제

I recently discovered lombok and I enjoy the comfort it's usage brings. There is only one particular thing I am missing.

So just out of curiosity: How could I extend the @AllArgsConstructor annotation in a way that it provides an additional default constructor to the class on which it is applied?

I was thinking of using Spring 4.0's capability to build composed annotations, but I must admit I never programmed a custom annotation before. So I don't really know how to start ...

Any suggestions?

도움이 되었습니까?

해결책

I don't know how to extend the annotation, but if you want to add a default constructor, you can add the Lombok @NoArgsConstructor annotation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top