java.lang.module.ModuleFinderpublic class LayerModuleFinder extends Object implements java.lang.module.ModuleFinder
| Constructor | Description |
|---|---|
LayerModuleFinder(String moduleName,
String[] exportsNames,
String[] requiresNames,
java.util.function.Function<String,byte[]> classMapper) |
construct a finder for a single module populated with classes
by the supplier classmapper
|
| Modifier and Type | Method | Description |
|---|---|---|
Optional<java.lang.module.ModuleReference> |
find(String name) |
|
Set<java.lang.module.ModuleReference> |
findAll() |
public LayerModuleFinder(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 function 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".public Optional<java.lang.module.ModuleReference> find(String name)
find in interface java.lang.module.ModuleFinderpublic Set<java.lang.module.ModuleReference> findAll()
findAll in interface java.lang.module.ModuleFinderCopyright © 2018. All rights reserved.