TinCanJava icon indicating copy to clipboard operation
TinCanJava copied to clipboard

Improve Lombok .toString generation for subclasses

Open brianjmiller opened this issue 11 years ago • 1 comments

Lombok's @ToString implementation doesn't provide attributes from a base class unless specified. Need to check @Data to see if we can pass that option through, or add a new annotation in classes that have a meaningful parent. See callSuper here: http://projectlombok.org/features/ToString.html

brianjmiller avatar Feb 26 '14 15:02 brianjmiller

Looks like they'll have to be added annotations:

@Data is like having implicit @Getter, @Setter, @ToString, @EqualsAndHashCode and @RequiredArgsConstructor annotations on the class. However, the parameters of these annotations (such as callSuper, includeFieldNames and exclude) cannot be set with @Data. If you need to set non-default values for any of these parameters, just add those annotations explicitly; @Data is smart enough to defer to those annotations.

brianjmiller avatar Feb 26 '14 15:02 brianjmiller