/** * 声明模块名称:algorithm.api,open:可选项; * 当用open修饰module时表示模块中的任何类都可以被外部访问到; * all packages in a given module should be accessible at runtime and via * reflection to all other modules */ [open] module algorithm.api {
// 限定访问包的模块 opens nl.frisodobber.java9.jigsaw.calculator.algorithm.api.scala to java.desktop, java.sql;
/** * By default, a module with runtime reflective access to a package can see the package’s public types * (and their nested public and protected types). However, code in other modules can access all types in * the exposed package and all members within those types, including private members via setAccessible, * as in earlier Java versions. */
Netty can be used in modular JDK9+ applications as a collection of automatic modules. The module names follow the reverse-DNS style, and are derived from subproject names rather than root packages due to historical reasons. They are listed below: