@HashCodeAndEqualsPlugin.Enhance public class ModuleLayerFromSingleClassLoaderDecorator extends Object implements ClassLoaderDecorator
ClassLoaderDecorator that creates module layers for dynamically
generated types using the Java Module System. The module information is resolved from a provided
module-info class. Without such a class, the decoration is omitted.| Modifier and Type | Class and Description |
|---|---|
static class |
ModuleLayerFromSingleClassLoaderDecorator.AbstractModuleFinder
An abstract implementation of a module finder that can locate specific modules.
|
static class |
ModuleLayerFromSingleClassLoaderDecorator.AbstractModuleReader
An abstract implementation of a module reader that provides access to dynamically generated types.
|
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.Configuration
A proxy for the
java.lang.module.Configuration type. |
static class |
ModuleLayerFromSingleClassLoaderDecorator.Factory
A factory for creating a single module from a
module-info class file, if available. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.ModuleDescriptor
A proxy for the
java.lang.module.ModuleDescriptor type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.ModuleFinder
A proxy for the
java.lang.module.ModuleFinder type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.ModuleLayer
A proxy for the
java.lang.ModuleLayer type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.ModuleLayerController
A proxy for the
java.lang.ModuleLayer.Controller type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.Optional
A proxy for the
java.util.Optional type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.Path
A proxy for the
java.nio.file.Path type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.SimpleModuleFinder
A proxy for the dynamically generated
SimpleModuleFinder type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.SimpleModuleReference
A proxy for the dynamically generated
SimpleModuleReference type. |
protected static interface |
ModuleLayerFromSingleClassLoaderDecorator.Stream
A proxy for the
java.util.stream.Stream type. |
ClassLoaderDecorator.NoOp| Modifier | Constructor and Description |
|---|---|
protected |
ModuleLayerFromSingleClassLoaderDecorator(ClassLoader classLoader,
Object moduleLayer,
String name,
Set<String> packages)
Creates a new module layer from module info decorator.
|
| Modifier and Type | Method and Description |
|---|---|
ClassLoader |
apply(TypeDescription typeDescription)
Applies this decorator to resolve a class loader for the given type.
|
boolean |
isSkipped(TypeDescription typeDescription)
Determines if a type should be skipped from class loader decoration.
|
protected ModuleLayerFromSingleClassLoaderDecorator(@MaybeNull ClassLoader classLoader, Object moduleLayer, String name, Set<String> packages)
classLoader - The class loader to delegate to when types are not handled by the module layer.moduleLayer - The module layer containing the dynamically created module.name - The name of the module within the module layer.packages - The packages that are exported by the module.public boolean isSkipped(TypeDescription typeDescription)
isSkipped in interface ClassLoaderDecoratortypeDescription - The type description to check.true if the type should be skipped from decoration.@MaybeNull public ClassLoader apply(TypeDescription typeDescription)
apply in interface ClassLoaderDecoratortypeDescription - The type description for which to resolve a class loader.null for the bootstrap class loader.Copyright © 2014–2025. All rights reserved.