August 2017
Beginner
298 pages
7h 26m
English
We looked at the problem of dependency leakage in Chapter 5, Using Platform APIs. The module that you depend on might have APIs that might also require you to use another module. Here's an example:

module A {
requires B;
}
module B {
requires C;
}
The module A requires module B, which in turn requires C. We know that with this, A does not read C, since module dependencies are not transitive in nature. But what if it needs to? For instance, if B has an API whose return type is in module C.
A good example can be found in the platform module itself. Let's say you write your custom module that reads java.sql. And you'd like ...
Read now
Unlock full access