RusticiSoftware / TinCanJava

Tin Can Java Library
http://rusticisoftware.github.io/TinCanJava/
Apache License 2.0
44 stars 46 forks source link

Improve Lombok .toString generation for subclasses #20

Open brianjmiller opened 10 years ago

brianjmiller commented 10 years ago

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 commented 10 years ago

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.