personnummer / java

Validate Swedish personal identity numbers
MIT License
8 stars 6 forks source link

[FEATURE] - Lombok #85

Closed cbhat5 closed 1 year ago

cbhat5 commented 1 year ago

Description

Gets rid of boilerplate getters and setters **Breaking changes**
cbhat5 commented 1 year ago

@Johannestegner what do you think? (#87 )

Johannestegner commented 1 year ago

I'm a bit hesitant to add a new dependency, and seeing the geters and seters in the project are quite few, I find them alright to write (and I'd be a bit scared to expose all private properties by default).

cbhat5 commented 1 year ago

You could add @Getter to each of the private attribute as well for attribute level exposure. Only the new thing is one would need to install Lombok plugin/extension for their IDE to recognize. And if you want to hide only one of the many attributes, you can put a @Getter on top of the class and add the below to that one particular attribute. Really gets rid of lot of boilerplate. If you are still open we can see...


@Getter(AccessLevel.NONE)
@Setter(AccessLevel.NONE)
private int mySecret;