Package com.apgar.common.lib.utils
Class ModulesClassLoadersUtils
java.lang.Object
com.apgar.common.lib.utils.ModulesClassLoadersUtils
Utility class for managing and retrieving class loaders for modules.
-
Method Summary
Modifier and TypeMethodDescriptiongetClassLoader(String moduleName) Retrieves the class loader for the specified module name.static ModulesClassLoadersUtilsRetrieves the instance ofModulesClassLoadersUtils.
-
Method Details
-
getInstance
Retrieves the instance ofModulesClassLoadersUtils.- Returns:
- the single instance of
ModulesClassLoadersUtils.
-
getClassLoader
Retrieves the class loader for the specified module name.If the class loader is already cached, it will return the cached instance. Otherwise, it will retrieve the class loader from the
ModuleHomeand cache it for future use.- Parameters:
moduleName- the name of the module for which to retrieve the class loader- Returns:
- the class loader for the specified module, or
nullif the module is not registered.
-