@Accessors(chain=true) vs @Setter(chain=true)

1,576 views
Skip to first unread message

Roger Keays

unread,
Jun 18, 2014, 3:39:06 AM6/18/14
to project...@googlegroups.com
Wouldn't it make more sense to have the chain option on the Setter annotation?

ie.

@Getter @Setter(chain=true)
public class MyObject {}

instead of 

@Getter @Setter @Accessors(chain=true)
public class MyObject {}

Reinier Zwitserloot

unread,
Jun 18, 2014, 11:14:43 AM6/18/14
to project-lombok
Yes, we had some debates on that topic. It feels part of accessors but it's only relevant for setters. I doubt it's wise to change it now, though.


 --Reinier Zwitserloot


--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Martin Grajcar

unread,
Jun 18, 2014, 12:32:22 PM6/18/14
to project...@googlegroups.com
Just in case the OP is not aware of this cool feature:

I've just removed all my @Accessors from a small project in favor of these three lines in lombok.config:

lombok.getter.noIsPrefix=true
lombok.accessors.fluent=true
lombok.accessors.chain=true

I was surprised of how inconsistent I had been.

Reply all
Reply to author
Forward
0 new messages