You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a class has a large number of final properties, @RequiredArgsConstructor can elegantly help generate the constructor. However, when this class has subclasses, the subclass constructor must call the constructor generated by @RequiredArgsConstructor in the parent class. Since it is automatically generated, the order and number of parameters need to be manually adjusted. I hope @RequiredArgsConstructor can add an attribute to support checking final fields in the parent class, or alternatively, introduce a new annotation for this purpose. I believe you can easily implement this. Many thanks! 🙏 Elegance never goes out of style.
The text was updated successfully, but these errors were encountered:
tangwangwang
changed the title
[FEATURE] 使用@RequiredArgsConstructor后,子类构造方法依赖@RequiredArgsConstructor生成的构造方法
[FEATURE] After using @RequiredArgsConstructor, the subclass constructor depends on the constructor generated by @RequiredArgsConstructor.
Feb 6, 2025
When a class has a large number of final properties,
@RequiredArgsConstructor
can elegantly help generate the constructor. However, when this class has subclasses, the subclass constructor must call the constructor generated by@RequiredArgsConstructor
in the parent class. Since it is automatically generated, the order and number of parameters need to be manually adjusted. I hope@RequiredArgsConstructor
can add an attribute to support checking final fields in the parent class, or alternatively, introduce a new annotation for this purpose. I believe you can easily implement this. Many thanks! 🙏 Elegance never goes out of style.The text was updated successfully, but these errors were encountered: