APIdia Launch Partner
Top Description Inners Constructors Methods
jdk.internal.module

public final Class ModuleLoaderMap

extends Object
Class Inheritance
Imports
java.lang.module.Configuration, .ResolvedModule, java.util.HashMap, .Map, .Set, java.util.function.Function, jdk.internal.loader.ClassLoaders

Supports the mapping of modules to class loaders. The set of modules mapped to the boot and platform class loaders is generated at build time from this source file.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ModuleLoaderMap.Mapper

Maps the system modules to the built-in class loaders.

private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Set<String>
bootModules()

Returns the names of the modules defined to the boot loader.

public static boolean
isBuiltinMapper(Function<String, ClassLoader> clf)

When defining modules for a configuration, we only allow defining modules to the boot or platform classloader if the ClassLoader mapping function originate from here.

pack-priv static Function<String, ClassLoader>
mappingFunction(Configuration cf)

Returns a function to map modules in the given configuration to the built-in class loaders.

public static Set<String>
nativeAccessModules()

Returns the names of the modules defined to the application loader which perform native access.

public static Set<String>
platformModules()

Returns the names of the modules defined to the platform loader.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ModuleLoaderMapback to summary
public ModuleLoaderMap()

Method Detail

bootModulesback to summary
public static Set<String> bootModules()

Returns the names of the modules defined to the boot loader.

isBuiltinMapperback to summary
public static boolean isBuiltinMapper(Function<String, ClassLoader> clf)

When defining modules for a configuration, we only allow defining modules to the boot or platform classloader if the ClassLoader mapping function originate from here.

mappingFunctionback to summary
pack-priv static Function<String, ClassLoader> mappingFunction(Configuration cf)

Returns a function to map modules in the given configuration to the built-in class loaders.

nativeAccessModulesback to summary
public static Set<String> nativeAccessModules()

Returns the names of the modules defined to the application loader which perform native access.

platformModulesback to summary
public static Set<String> platformModules()

Returns the names of the modules defined to the platform loader.

jdk.internal.module back to summary

private final Class ModuleLoaderMap.Mapper

extends Object
implements Function<String, ClassLoader>
Class Inheritance
All Implemented Interfaces
java.util.function.Function

Maps the system modules to the built-in class loaders.

Field Summary

Modifier and TypeField and Description
private static final ClassLoader
private static final String
private final Map<String, String>
map

Map from module name to class loader name.

private static final ClassLoader
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv
Mapper(Configuration cf)

Creates a Mapper to map module names in the given Configuration to built-in classloaders.

Method Summary

Modifier and TypeMethod and Description
public ClassLoader
apply(String name)

Implements java.util.function.Function.apply.

Applies this function to the given argument.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

APP_CLASSLOADERback to summary
private static final ClassLoader APP_CLASSLOADER
APP_LOADER_NAMEback to summary
private static final String APP_LOADER_NAME
mapback to summary
private final Map<String, String> map

Map from module name to class loader name. The name is resolved to the actual class loader in apply.

PLATFORM_CLASSLOADERback to summary
private static final ClassLoader PLATFORM_CLASSLOADER
PLATFORM_LOADER_NAMEback to summary
private static final String PLATFORM_LOADER_NAME

Constructor Detail

Mapperback to summary
pack-priv Mapper(Configuration cf)

Creates a Mapper to map module names in the given Configuration to built-in classloaders. As a proxy for the actual classloader, we store an easily archiveable loader name in the internal map.

Method Detail

applyback to summary
public ClassLoader apply(String name)

Implements java.util.function.Function.apply.

Doc from java.util.function.Function.apply.

Applies this function to the given argument.

Annotations
@Override
jdk.internal.module back to summary

private Class ModuleLoaderMap.Modules

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Set<String>
private static final Set<String>
private static final Set<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bootModulesback to summary
private static final Set<String> bootModules
nativeAccessModulesback to summary
private static final Set<String> nativeAccessModules
platformModulesback to summary
private static final Set<String> platformModules

Constructor Detail

Modulesback to summary
private Modules()