Optimizing module exports
At the end of the previous chapter, we begrudgingly added the exports qualifier for the package containing the main JavaFX class in the module descriptor for the packt.addressbook.ui module. We did this because the way the JavaFX framework works, it needs to be able to access the class that extends javafx.application.Application that launches the UI application. We said how that isn't an ideal solution because not only are we exporting the package to the JavaFX framework, we are essentially exporting it to the whole world, that is, any module that reads packt.addressbook.ui.
With our new knowledge of qualified exports, we have just the solution for this problem! Instead of exporting packt.addressbook.ui globally, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access