Rename setter methods to fit Lombok

MSAL

Rename methods that are effectively setter to the name Lombok would give them. Limitations:

  • If two methods in a class are effectively the same setter then one's name will be corrected and the others name will be left as it is.
  • If the correct name for a method is already taken by another method then the name will not be corrected.
  • Method name swaps or circular renaming within a class cannot be performed because the names block each other. E.g. int getFoo() { return ba; } int getBa() { return foo; } stays as it is.
org.openrewrite.java.migrate.lombok.AdoptLombokSetterMethodNames
mod run . --recipe=org.openrewrite.java.migrate.lombok.AdoptLombokSetterMethodNames

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.