Include Private API

By default, dependent modules can only access public entities of their parent modules. For example, let's say there is module A and module B where B depends on A. B can only access public entities of module A and public classes of module A.

However, a facility is available for scenarios where you want two modules to be more tightly coupled and allow the dependent module to access private APIs in the other. To enable this access, set the Include Private API flag in module-descriptor.xml:

images/download/attachments/144836462/includePrivateAPI-version-1-modificationdate-1678371728000-api-v2.png

In the above screenshot, module TestA depends on the Bookstore module, and Include Private API is set. This means the TestA module can access all the private entities and private classes of the Bookstore module.

Private APIs should be used cautiously, with an understanding that private APIs are not guaranteed to be backward-compatible, and thus upgrades to the module you depend on may break your code!