Module org.glassfish.hk2.core
Package com.sun.enterprise.module.single
Class ClassPathBasedModulesRegistry
java.lang.Object
com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
com.sun.enterprise.module.impl.ModulesRegistryImpl
com.sun.enterprise.module.single.ClassPathBasedModulesRegistry
- All Implemented Interfaces:
ModuleChangeListener,ModulesRegistry
Implements a modules registry based on a class-path style of module
description using a single class loader (capable of loading the entire
class-path)
- Author:
- Jerome Dochez
-
Field Summary
Fields inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
parent, providers, repositories -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFinds theHK2Modulethat owns the given class.Returns the list of shared Modules registered in this instance.getModules(String moduleName) Returns the list of shared Modules registered in this instance whose name matches the given namemakeModuleFor(String name, String version, boolean resolve) Returns theHK2Moduleinstance giving a name and version constraints.protected List<org.glassfish.hk2.api.ActiveDescriptor>parseInhabitants(HK2Module module, String name, org.glassfish.hk2.api.ServiceLocator serviceLocator, List<org.glassfish.hk2.api.PopulatorPostProcessor> postProcessors) Methods inherited from class com.sun.enterprise.module.impl.ModulesRegistryImpl
createChild, detachAll, getLifecycleListeners, getModulesClassLoader, getModulesClassLoader, getParentClassLoader, getProvidingModule, newModule, register, setParentClassLoader, shutdown, unregisterMethods inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
add, add, add, addRepository, addRepository, changed, createServiceLocator, createServiceLocator, createServiceLocator, dumpState, getAllServiceLocators, getModulesProvider, getProvidersClass, getRepository, getRunningServices, initializeServiceLocator, loadFromRepository, makeModuleFor, makeModuleFor, newServiceLocator, newServiceLocator, populateConfig, populateServiceLocator, print, registerRunningService, remove, removeRepository, unregisterRunningService
-
Constructor Details
-
ClassPathBasedModulesRegistry
- Throws:
IOException
-
-
Method Details
-
find
Description copied from interface:ModulesRegistryFinds theHK2Modulethat owns the given class.- Specified by:
findin interfaceModulesRegistry- Overrides:
findin classModulesRegistryImpl- Returns:
- null if the class is loaded outside the module system.
-
getModules
Description copied from interface:ModulesRegistryReturns the list of shared Modules registered in this instance whose name matches the given nameThe returned list will not include the modules defined in the ancestor
ModulesRegistrys.- Specified by:
getModulesin interfaceModulesRegistry- Overrides:
getModulesin classAbstractModulesRegistryImpl- Returns:
- an umodifiable list of loaded modules having names that match the given name
-
getModules
Description copied from class:AbstractModulesRegistryImplReturns the list of shared Modules registered in this instance.The returned list will not include the modules defined in the ancestor
AbstractModulesRegistryImpls.- Specified by:
getModulesin interfaceModulesRegistry- Overrides:
getModulesin classAbstractModulesRegistryImpl- Returns:
- an umodifiable list of loaded modules
-
makeModuleFor
Description copied from interface:ModulesRegistryReturns theHK2Moduleinstance giving a name and version constraints.- Specified by:
makeModuleForin interfaceModulesRegistry- Overrides:
makeModuleForin classAbstractModulesRegistryImpl- Parameters:
name- the module nameversion- the module version. Caller should specify a correct version.resolve- should the module be resolved or not- Returns:
- the module instance or null if none can be found
- Throws:
ResolveError- if the module dependencies cannot be resolved
-
parseInhabitants
protected List<org.glassfish.hk2.api.ActiveDescriptor> parseInhabitants(HK2Module module, String name, org.glassfish.hk2.api.ServiceLocator serviceLocator, List<org.glassfish.hk2.api.PopulatorPostProcessor> postProcessors) throws IOException - Overrides:
parseInhabitantsin classModulesRegistryImpl- Throws:
IOException
-