Is it possible to create inheritance-based (or nested) modules in Java 9?
Something like this:
module a
|
├── module a1
|
└── module a2
In this example, both the a1
and a2
modules are children of a
.
If I import either of the child modules, I would get the functionality of the parent (a
) along with any functionality defined in that child. That is, I could import a1
, and explicitly gain access to the functionality of both a
and a1
(but not a2
).
Both a1
and a2
are an a
, and can access all of the packages of a
, without having to expose the packages of a
to them.