Class ModuleLayerFromSingleClassLoaderDecorator.AbstractModuleFinder

java.lang.Object
net.bytebuddy.dynamic.loading.ModuleLayerFromSingleClassLoaderDecorator.AbstractModuleFinder
Enclosing class:
ModuleLayerFromSingleClassLoaderDecorator

public abstract static class ModuleLayerFromSingleClassLoaderDecorator.AbstractModuleFinder extends Object
An abstract implementation of a module finder that can locate specific modules.

This class provides the base functionality for finding modules based on their names and serves as a foundation for creating custom module finders.

  • Field Details

    • name

      private final String name
      The name of the module this finder can locate.
    • moduleReference

      private final Object moduleReference
      The module reference for the module this finder manages.
  • Constructor Details

    • AbstractModuleFinder

      protected AbstractModuleFinder(String name, Object moduleReference)
      Creates a new abstract module finder.
      Parameters:
      name - The name of the module.
      moduleReference - The module reference.
  • Method Details

    • doFind

      @MaybeNull protected Object doFind(String name)
      Finds a module by name.
      Parameters:
      name - The module name to find.
      Returns:
      An optional containing the module reference if found, empty otherwise.
    • doFindAll

      protected Set<?> doFindAll()
      Finds all modules managed by this finder.
      Returns:
      A set containing the single module reference managed by this finder.