JPMS: 'transitive' dependency
AKA requires transitive—implied readability.
To specify a dependency on another module and to ensure that other modules reading your module also read that dependency—known as implied readability
=>Use requires transitive, as in:
Consider the following directive from the java.desktop module declaration:
In this case, any module that reads java.desktop also implicitly reads java.xml.
For example, if a method from the java.desktop module returns a type from the java.xml module, code in modules that read java.desktop becomes dependent on java.xml.
Without the requires transitive directive in java.desktop’s module declaration, such dependent modules will not compile unless they explicitly read java.xml.
Almost done…
We just sent you an email. Please click the link in the email to confirm your subscription!