use of jdk.internal.loader.BuiltinClassLoader in project Bytecoder by mirkosertic.
the class ModuleBootstrap method loadModules.
/**
* Load/register the modules to the built-in class loaders.
*/
private static void loadModules(Configuration cf, Function<String, ClassLoader> clf) {
for (ResolvedModule resolvedModule : cf.modules()) {
ModuleReference mref = resolvedModule.reference();
String name = resolvedModule.name();
ClassLoader loader = clf.apply(name);
if (loader == null) {
// skip java.base as it is already loaded
if (!name.equals(JAVA_BASE)) {
BootLoader.loadModule(mref);
}
} else if (loader instanceof BuiltinClassLoader) {
((BuiltinClassLoader) loader).loadModule(mref);
}
}
}
Aggregations