< prev index next >
src/java.base/share/classes/jdk/internal/loader/BootLoader.java
Print this page
@@ -37,10 +37,11 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
import java.util.stream.Stream;
import jdk.internal.misc.JavaLangAccess;
@@ -66,10 +67,14 @@
}
// ServiceCatalog for the boot class loader
private static final ServicesCatalog SERVICES_CATALOG = new ServicesCatalog();
+ // ClassLoaderValue map for boot class loader
+ private static final ConcurrentHashMap<?, ?> CLASS_LOADER_VALUE_MAP =
+ new ConcurrentHashMap<>();
+
/**
* Returns the unnamed module for the boot loader.
*/
public static Module getUnnamedModule() {
return UNNAMED_MODULE;
@@ -81,10 +86,17 @@
public static ServicesCatalog getServicesCatalog() {
return SERVICES_CATALOG;
}
/**
+ * Returns the ClassLoaderValue map for the boot class loader.
+ */
+ public static ConcurrentHashMap<?, ?> getClassLoaderValueMap() {
+ return CLASS_LOADER_VALUE_MAP;
+ }
+
+ /**
* Register a module with this class loader so that its classes (and
* resources) become visible via this class loader.
*/
public static void loadModule(ModuleReference mref) {
ClassLoaders.bootLoader().loadModule(mref);
< prev index next >