类的用途
java.lang.ModuleLayer
使用 ModuleLayer 的包
包
描述
提供对 Java 编程语言的设计至关重要的类。
包含集合框架、一些国际化支持类、服务加载器、属性、随机数生成、字符串解析和扫描类、base64 编码和解码、位数组和几个杂项实用程序类。
-
ModuleLayer 在 java.lang 中的用法
java.lang 中返回 ModuleLayer 的方法修饰符和类型方法描述static ModuleLayerModuleLayer.boot()返回引导层。ModuleLayer.defineModules(Configuration cf, Function<String, ClassLoader> clf) 通过将给定Configuration中的模块定义到 Java 虚拟机,创建一个新的模块层,并将该层作为其父层。ModuleLayer.defineModulesWithManyLoaders(Configuration cf, ClassLoader parentLoader) 通过将给定Configuration中的模块定义到 Java 虚拟机,创建一个新的模块层,并将该层作为其父层。ModuleLayer.defineModulesWithOneLoader(Configuration cf, ClassLoader parentLoader) 通过将给定Configuration中的模块定义到 Java 虚拟机,创建一个新的模块层,并将该层作为其父层。static ModuleLayerModuleLayer.empty()返回 empty 层。Module.getLayer()返回包含此模块的模块层,如果此模块不在模块层中,则返回null。ModuleLayer.Controller.layer()返回此对象控制的图层。返回类型中包含 ModuleLayer 类型参数的 java.lang 中的方法java.lang 中的方法参数,类型参数为 ModuleLayer修饰符和类型方法描述static ModuleLayer.ControllerModuleLayer.defineModules(Configuration cf, List<ModuleLayer> parentLayers, Function<String, ClassLoader> clf) 通过将给定Configuration中的模块定义到 Java 虚拟机来创建一个新的模块层。static ModuleLayer.ControllerModuleLayer.defineModulesWithManyLoaders(Configuration cf, List<ModuleLayer> parentLayers, ClassLoader parentLoader) 通过将给定Configuration中的模块定义到 Java 虚拟机来创建一个新的模块层。static ModuleLayer.ControllerModuleLayer.defineModulesWithOneLoader(Configuration cf, List<ModuleLayer> parentLayers, ClassLoader parentLoader) 通过将给定Configuration中的模块定义到 Java 虚拟机来创建一个新的模块层。 -
ModuleLayer 在 java.util 中的用法
java.util 中的方法,参数类型为 ModuleLayer修饰符和类型方法描述static <S> ServiceLoader<S>ServiceLoader.load(ModuleLayer layer, Class<S> service) 为给定的服务类型创建一个新的服务加载器,以从给定模块层及其祖先的模块加载服务提供者。