Replace constant interfaces with final classes
ProprietaryTurns an interface that declares only constants into a final class with a private constructor and explicitly public static final fields, so Constants.X and static imports compile unchanged. It is left alone when the repository extends it, tests or casts against it, uses it as a bound or class literal, or annotates it with anything but @Deprecated or @SuppressWarnings, and in test sources.
io. moderne. staticanalysis. ReplaceConstantInterfaceWithClassmod run . --recipe= io. moderne. staticanalysis. ReplaceConstantInterfaceWithClassInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.