APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.loader

public final Class LoaderPool

extends Object
Class Inheritance
Imports
java.lang.module.Configuration, .ResolvedModule, java.util.HashMap, .List, .Map, java.util.stream.Stream

A pool of class loaders.
See Also
ModuleLayer#defineModulesWithManyLoaders

Field Summary

Modifier and TypeField and Description
private final Map<String, Loader>

Constructor Summary

AccessConstructor and Description
public
LoaderPool(Configuration cf, List<ModuleLayer> parentLayers, ClassLoader parentLoader)

Creates a pool of class loaders.

Method Summary

Modifier and TypeMethod and Description
public Loader
loaderFor(String name)

Returns the class loader for the named module

public Stream<Loader>
loaders()

Returns a stream of the loaders in this pool.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loadersback to summary
private final Map<String, Loader> loaders

Constructor Detail

LoaderPoolback to summary
public LoaderPool(Configuration cf, List<ModuleLayer> parentLayers, ClassLoader parentLoader)

Creates a pool of class loaders. Each module in the given configuration is mapped to its own class loader in the pool. The class loader is created with the given parent class loader as its parent.

Method Detail

loaderForback to summary
public Loader loaderFor(String name)

Returns the class loader for the named module

loadersback to summary
public Stream<Loader> loaders()

Returns a stream of the loaders in this pool.