Unfold wildcard imports

Proprietary

Replaces each wildcard import in a Java source, such as import java.util.*;, with single-type imports of the types the file names from it, and removes a wildcard import the file names no type from. The set of names a wildcard brings into scope depends on the contents of another package, so a class added there can silently change which type a simple name resolves to, or stop the file from compiling. The other imports keep their order. Static wildcard imports such as import static org.junit.Assert.*;, test sources, and files with types that did not resolve are left unchanged.

io.moderne.staticanalysis.UnfoldWildcardImports
mod run . --recipe=io.moderne.staticanalysis.UnfoldWildcardImports

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