openrewrite / rewrite

Automated mass refactoring of source code.
https://docs.openrewrite.org
Apache License 2.0
2.19k stars 329 forks source link

Auto Lombok @Setter #3158

Open blipper opened 1 year ago

blipper commented 1 year ago

For any simple getter that iff sets a private field with the same bean style name as the getter remove the getter and replace with a @Setter attribute

https://projectlombok.org/features/GetterSetter

timo-a commented 5 days ago

Does this work for you? https://timo-a.github.io/rewrite-recipe-starter/component-singleton/0/recipes/lombok/ConvertSetter.html

In case the docs URL changes: recipe io.github.timoa.lombok.ConvertSetter in https://mvnrepository.com/artifact/io.github.timo-a/rewrite-recipe-starter