Top Description Fields Constructors Methods
com.sun.enterprise.module.single

public Class ClassPathBasedModulesRegistry

extends ModulesRegistryImpl
Class Inheritance
Imports
com.sun.enterprise.module.ModuleDefinition, .ResolveError, .HK2Module, com.sun.enterprise.module.common_impl.DefaultModuleDefinition, com.sun.enterprise.module.impl.ModulesRegistryImpl, java.io.File, .IOException, java.util.ArrayList, .Collection, .List, .StringTokenizer, org.glassfish.hk2.api.ActiveDescriptor, .PopulatorPostProcessor, .ServiceLocator

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

Modifier and TypeField and Description
pack-priv final ClassLoader
pack-priv final List<ModuleDefinition>
pack-priv final List<HK2Module>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HK2Module
public Collection<HK2Module>
getModules(String moduleName)

Overrides com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.getModules.

Implements com.sun.enterprise.module.ModulesRegistry.getModules.

Returns the list of shared Modules registered in this instance whose name matches the given name

The returned list will not include the modules defined in the ancestor ModulesRegistrys.

public Collection<HK2Module>
public HK2Module
makeModuleFor(String name, String version, boolean resolve)

Overrides com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.makeModuleFor.

Implements com.sun.enterprise.module.ModulesRegistry.makeModuleFor.

Returns the HK2Module instance giving a name and version constraints.

protected List<ActiveDescriptor<T>>
Inherited from com.sun.enterprise.module.impl.ModulesRegistryImpl:
createChilddetachAllgetLifecycleListenersgetModulesClassLoadergetModulesClassLoadergetParentClassLoadergetProvidingModulenewModuleregistersetParentClassLoadershutdownunregister

Field Detail

cLoaderback to summary
pack-priv final ClassLoader cLoader
moduleDefsback to summary
pack-priv final List<ModuleDefinition> moduleDefs
modulesback to summary
pack-priv final List<HK2Module> modules

Hides com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.modules.

Constructor Detail

ClassPathBasedModulesRegistryback to summary
public ClassPathBasedModulesRegistry(ClassLoader singleCL, String classPath) throws IOException

Method Detail

findback to summary
public HK2Module find(Class<T> clazz)

Overrides com.sun.enterprise.module.impl.ModulesRegistryImpl.find.

Implements com.sun.enterprise.module.ModulesRegistry.find.

Doc from com.sun.enterprise.module.ModulesRegistry.find.

Finds the HK2Module that owns the given class.

Annotations
@Override
getModulesback to summary
public Collection<HK2Module> getModules(String moduleName)

Overrides com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.getModules.

Implements com.sun.enterprise.module.ModulesRegistry.getModules.

Doc from com.sun.enterprise.module.ModulesRegistry.getModules.

Returns the list of shared Modules registered in this instance whose name matches the given name

The returned list will not include the modules defined in the ancestor ModulesRegistrys.

Annotations
@Override
getModulesback to summary
public Collection<HK2Module> getModules()

Overrides com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.getModules.

Implements com.sun.enterprise.module.ModulesRegistry.getModules.

Doc from com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.getModules.

Returns the list of shared Modules registered in this instance.

The returned list will not include the modules defined in the ancestor AbstractModulesRegistryImpls.

Annotations
@Override
makeModuleForback to summary
public HK2Module makeModuleFor(String name, String version, boolean resolve) throws ResolveError

Overrides com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.makeModuleFor.

Implements com.sun.enterprise.module.ModulesRegistry.makeModuleFor.

Doc from com.sun.enterprise.module.ModulesRegistry.makeModuleFor.

Returns the HK2Module instance giving a name and version constraints.

Annotations
@Override
Exceptions
ResolveError:
if the module dependencies cannot be resolved
parseInhabitantsback to summary
protected List<ActiveDescriptor<T>> parseInhabitants(HK2Module module, String name, ServiceLocator serviceLocator, List<PopulatorPostProcessor> postProcessors) throws IOException

Overrides com.sun.enterprise.module.impl.ModulesRegistryImpl.parseInhabitants.

Annotations
@Override