Finalize classes with private constructors

MSAL

Adds the final modifier to classes whose constructors are all private. If a class cannot be instantiated from the outside, marking it final communicates that it was not designed for inheritance and prevents accidental subclassing.

org.openrewrite.staticanalysis.FinalClass
mod run . --recipe=org.openrewrite.staticanalysis.FinalClass

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