Class ModuleLayerFromSingleClassLoaderDecorator.AbstractModuleFinder

  • Enclosing class:
    ModuleLayerFromSingleClassLoaderDecorator

    public abstract static class ModuleLayerFromSingleClassLoaderDecorator.AbstractModuleFinder
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object moduleReference
      The module reference for the module this finder manages.
      private java.lang.String name
      The name of the module this finder can locate.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractModuleFinder​(java.lang.String name, java.lang.Object moduleReference)
      Creates a new abstract module finder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object doFind​(java.lang.String name)
      Finds a module by name.
      protected java.util.Set<?> doFindAll()
      Finds all modules managed by this finder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

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

        private final java.lang.Object moduleReference
        The module reference for the module this finder manages.
    • Constructor Detail

      • AbstractModuleFinder

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

      • doFind

        @MaybeNull
        protected java.lang.Object doFind​(java.lang.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 java.util.Set<?> doFindAll()
        Finds all modules managed by this finder.
        Returns:
        A set containing the single module reference managed by this finder.