|
|
|
|
|
by antidamage
224 days ago
|
|
It's about the annotation triggering a code pre-processor. For example in Lombok, the @Data annotation will create a getter and a setter for every private member, and @Getter and @Setter will do the individual methods respectively. Annotating a class will do every private member, or you can annotate a specific member. A lens is a shortcut to making a getter/setter for something several elements deep, where instead of calling: `parentObject.getChild().setChildAttribute()`
you can call:
`parentObject.setChildAttributeViaLens()` and not need to write multiple functions in both classes, or even use multiple annotations. |
|