public class LayerFactory extends Object
Constructor | Description |
---|---|
LayerFactory() |
Modifier and Type | Method | Description |
---|---|---|
static Module |
installModule(String moduleName,
String[] exportsNames,
String[] requiresNames,
java.util.function.Function<String,byte[]> classMapper) |
Create a module Layer above the boot Layer and install a module into it returning
a classloader which can be used to drive installation of classes into the module.
|
public static Module installModule(String moduleName, String[] exportsNames, String[] requiresNames, java.util.function.Function<String,byte[]> classMapper)
moduleName
- the name of the one module to be installed in the layerexportsNames
- an array of names of packages to be exported by the modulerequiresNames
- an array of names of modules to be imported by the moduleclassMapper
- a mapper provided by the caller to populate the module with
classes which accepts a class name and returns the corresponding class file format
byte array. The name will be presented in the format "x/y/z/MyClass.class".Copyright © 2018. All rights reserved.