Java 9中的模块信息文件中的“ export”子句有什么用?
在“module-info.java”文件中可以使用两种类型的“export”子句。
我们需要允许其他模块使用软件包tp.com.nhooo.model的类和接口,我们可以这样编写:
module com.nhooo.model { exports tp.com.nhooo.model; }
module com.nhooo.model { exports tp.com.nhooo.model to com.nhooo.gui; }