
Java 11 Cookbook
By :

The other technique for migration is top-down migration. In this approach, we start with the root JAR in the dependency graph of the JARs.
JARs indicate a codebase. We have assumed that the codebase is available in the form of JARs and hence the dependency graph that we get has nodes, which are JARs.
Modularizing the root of the dependency graph would mean that all other JARs on which this root depends have to be modular. Otherwise, this modular root cannot declare a dependency on unnamed modules. Let's consider the example non-modular application we introduced in our Bottom-Up Migration recipe. The dependency graph looks something like this:
We extensively make use of automatic modules in top-down migration. Automatic modules are modules that are implicitly created by the JVM. These are created based on the non-modular JARs available in the module path.
We will make use of the calculator example that we introduced in the previous recipe, Bottom-up migration...
Change the font size
Change margin width
Change background colour