Package org.jboss.modules
Class JarModuleFinder
- java.lang.Object
-
- org.jboss.modules.JarModuleFinder
-
- All Implemented Interfaces:
ModuleFinder
public final class JarModuleFinder extends java.lang.Object implements ModuleFinder
A module finder which uses a JAR file as a module repository.
-
-
Field Summary
Fields Modifier and Type Field Description private java.security.AccessControlContextcontextprivate java.util.jar.JarFilejarFileprivate ModuleIdentifiermyIdentifier
-
Constructor Summary
Constructors Constructor Description JarModuleFinder(ModuleIdentifier myIdentifier, java.util.jar.JarFile jarFile)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleSpecfindModule(ModuleIdentifier identifier, ModuleLoader delegateLoader)Find a module specification for the given identifier.
-
-
-
Field Detail
-
myIdentifier
private final ModuleIdentifier myIdentifier
-
jarFile
private final java.util.jar.JarFile jarFile
-
context
private final java.security.AccessControlContext context
-
-
Constructor Detail
-
JarModuleFinder
public JarModuleFinder(ModuleIdentifier myIdentifier, java.util.jar.JarFile jarFile)
Construct a new instance.- Parameters:
myIdentifier- the identifier to use for the JAR itselfjarFile- the JAR file to encapsulate
-
-
Method Detail
-
findModule
public ModuleSpec findModule(ModuleIdentifier identifier, ModuleLoader delegateLoader) throws ModuleLoadException
Description copied from interface:ModuleFinderFind a module specification for the given identifier.- Specified by:
findModulein interfaceModuleFinder- Parameters:
identifier- the module identifierdelegateLoader- the module loader from which dependencies should be resolved- Returns:
- the module specification, or
nullif no specification is found for this identifier - Throws:
ModuleLoadException
-
-