Class Module
- java.lang.Object
-
- org.jboss.modules.Module
-
public final class Module extends java.lang.Object
A module is a unit of classes and other resources, along with the specification of what is imported and exported by this module from and to other modules. Modules are created byModuleLoader
s which build modules from various configuration information and resource roots.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Module.Visited
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.RuntimePermission
ACCESS_MODULE_LOGGER
private static java.lang.RuntimePermission
ADD_CONTENT_HANDLER_FACTORY
private static java.lang.RuntimePermission
ADD_URL_STREAM_HANDLER_FACTORY
private static java.util.concurrent.atomic.AtomicReference<ModuleLoader>
BOOT_MODULE_LOADER
private static FastCopyHashSet<ClassFilter>
EMPTY_CLASS_FILTERS
private static FastCopyHashSet<PathFilter>
EMPTY_PATH_FILTERS
private LocalLoader
fallbackLoader
The fallback local loader, if any is defined.private static java.lang.RuntimePermission
GET_BOOT_MODULE_LOADER
private static java.lang.RuntimePermission
GET_CLASS_LOADER
private static java.lang.RuntimePermission
GET_DEPENDENCIES
private ModuleIdentifier
identifier
The identifier of this module.private Linkage
linkage
The linkage state.(package private) static ModuleLogger
log
The system-wide module logger, which may be changed viasetModuleLogger(org.jboss.modules.log.ModuleLogger)
.private java.lang.String
mainClassName
The name of the main class, if any (may benull
).private ModuleClassLoader
moduleClassLoader
The module class loader for this module.private ModuleLoader
moduleLoader
The module loader which created this module.private static java.security.PermissionCollection
NO_PERMISSIONS
private java.security.PermissionCollection
permissionCollection
The assigned permission collection.(package private) static ModulesPrivateAccess
PRIVATE_ACCESS
private java.util.Map<java.lang.String,java.lang.String>
properties
The properties map specified when this module was defined.(package private) static java.lang.String[]
systemPackages
(package private) static java.lang.String[]
systemPaths
-
Constructor Summary
Constructors Constructor Description Module(ConcreteModuleSpec spec, ModuleLoader moduleLoader)
Construct a new instance from a module specification.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private long
addExportedPaths(Dependency[] dependencies, java.util.Map<java.lang.String,java.util.List<LocalLoader>> map, FastCopyHashSet<PathFilter> filterStack, FastCopyHashSet<ClassFilter> classFilterStack, FastCopyHashSet<PathFilter> resourceFilterStack, java.util.Set<Module.Visited> visited)
private long
addPaths(Dependency[] dependencies, java.util.Map<java.lang.String,java.util.List<LocalLoader>> map, FastCopyHashSet<PathFilter> filterStack, FastCopyHashSet<ClassFilter> classFilterStack, FastCopyHashSet<PathFilter> resourceFilterStack, java.util.Set<Module.Visited> visited)
private Dependency[]
calculateDependencies(DependencySpec[] dependencySpecs)
private static java.security.PermissionCollection
copyPermissions(java.security.PermissionCollection permissionCollection)
private LocalLoader
createClassFilteredLocalLoader(ClassFilter filter, LocalLoader localLoader)
private LocalLoader
createPathFilteredLocalLoader(PathFilter filter, LocalLoader localLoader)
(package private) static java.lang.String
fileNameOfClass(java.lang.String className)
Get the file name of a class.static Module
forClass(java.lang.Class<?> clazz)
Get the module for a loaded class, ornull
if the class did not come from any module.static Module
forClassLoader(java.lang.ClassLoader cl, boolean search)
Get the module for a class loader, ornull
if the class loader is not associated with any module.static ModuleLoader
getBootModuleLoader()
Gets the boot module loader.static Module
getCallerModule()
Get the caller's module.static ModuleLoader
getCallerModuleLoader()
Gets the current module loader.ModuleClassLoader
getClassLoader()
Get the class loader for a module.(package private) ModuleClassLoader
getClassLoaderPrivate()
static ModuleLoader
getContextModuleLoader()
Get the current thread's context module loader.DependencySpec[]
getDependencies()
Get the current dependencies of this module.(package private) Dependency[]
getDependenciesInternal()
(package private) DependencySpec[]
getDependencySpecsInternal()
java.util.Set<java.lang.String>
getExportedPaths()
Get all the paths exported by this module.java.net.URL
getExportedResource(java.lang.String name)
Get an exported resource URL.Resource
getExportedResource(java.lang.String rootPath, java.lang.String resourcePath)
Get an exported resource from a specific root in this module.java.util.Enumeration<java.net.URL>
getExportedResources(java.lang.String name)
Get all exported resource URLs for a resource name.(package private) LocalLoader
getFallbackLoader()
ModuleIdentifier
getIdentifier()
Get this module's identifier.java.util.Set<java.lang.String>
getImportedPaths()
Get the (unmodifiable) set of paths which are imported into this module class loader, including local paths.(package private) java.lang.String
getMainClass()
Module
getModule(ModuleIdentifier identifier)
Get the module with the given identifier from the module loader used by this module.static Module
getModuleFromCallerModuleLoader(ModuleIdentifier identifier)
Get a module from the current module loader.ModuleLoader
getModuleLoader()
Get the module loader which created this module.static ModuleLogger
getModuleLogger()
Get the logger used by the module system.(package private) java.lang.Package
getPackage(java.lang.String name)
(package private) java.lang.Package[]
getPackages()
(package private) java.util.Map<java.lang.String,java.util.List<LocalLoader>>
getPaths()
(package private) java.util.Map<java.lang.String,java.util.List<LocalLoader>>
getPathsUnchecked()
java.security.PermissionCollection
getPermissionCollection()
Get the module's configured permission collection.static java.lang.String
getPlatformIdentifier()
Get the platform identifier.static ModulesPrivateAccess
getPrivateAccess()
Private access for module internal code.java.lang.String
getProperty(java.lang.String name)
Get the property with the given name, ornull
if none was defined.java.lang.String
getProperty(java.lang.String name, java.lang.String defaultVal)
Get the property with the given name, or a default value if none was defined.java.util.List<java.lang.String>
getPropertyNames()
Get a copy of the list of property names.(package private) java.net.URL
getResource(java.lang.String name)
Load a resource from a local loader.(package private) java.io.InputStream
getResourceAsStream(java.lang.String name)
Load a resource from a local loader.(package private) java.util.Enumeration<java.net.URL>
getResources(java.lang.String name)
Load all resources of a given name from a local loader.static long
getStartTime()
Return the start time in millis when Module.class was loaded.java.util.Iterator<Resource>
globResources(java.lang.String glob)
Enumerate all imported resources in this module which match the given glob expression.(package private) static void
initBootModuleLoader(ModuleLoader loader)
java.util.Iterator<Resource>
iterateResources(PathFilter filter)
Enumerate all the imported resources in this module, subject to a path filter.(package private) void
link(Linkage linkage)
static java.lang.Class<?>
loadClassFromBootModuleLoader(ModuleIdentifier moduleIdentifier, java.lang.String className)
Load a class from a module in the system module loader.static java.lang.Class<?>
loadClassFromCallerModuleLoader(ModuleIdentifier moduleIdentifier, java.lang.String className)
Load a class from a module in the caller's module loader.(package private) java.lang.Class<?>
loadModuleClass(java.lang.String className, boolean resolve)
Load a class from a local loader.<S> java.util.ServiceLoader<S>
loadService(java.lang.Class<S> serviceType)
Load a service loader from this module.<S> java.util.ServiceLoader<S>
loadServiceDirectly(java.lang.Class<S> serviceType)
Load a service loader from this module, without looking at dependencies.static <S> java.util.ServiceLoader<S>
loadServiceFromCallerModuleLoader(ModuleIdentifier identifier, java.lang.Class<S> serviceType)
Load a service loader from a module in the caller's module loader.private static java.security.PermissionCollection
noPermissions()
(package private) static java.lang.String
pathOf(java.lang.String resourceName)
Get the path name of a resource.(package private) static java.lang.String
pathOfClass(java.lang.String className)
Get the path name of a class.static void
registerContentHandlerFactoryModule(Module module)
Register an additional module which contains content handlers.static void
registerURLStreamHandlerFactoryModule(Module module)
Register an additional module which contains URL handlers.(package private) void
relink()
(package private) void
relinkIfNecessary()
void
run(java.lang.String[] args)
Run a module's main class, if any.(package private) void
setDependencies(java.util.List<DependencySpec> dependencySpecs)
(package private) void
setDependencies(DependencySpec[] dependencySpecs)
static void
setModuleLogger(ModuleLogger logger)
Change the logger used by the module system.java.lang.String
toString()
Get the string representation of this module.
-
-
-
Field Detail
-
BOOT_MODULE_LOADER
private static final java.util.concurrent.atomic.AtomicReference<ModuleLoader> BOOT_MODULE_LOADER
-
systemPackages
static final java.lang.String[] systemPackages
-
systemPaths
static final java.lang.String[] systemPaths
-
PRIVATE_ACCESS
static final ModulesPrivateAccess PRIVATE_ACCESS
-
log
static volatile ModuleLogger log
The system-wide module logger, which may be changed viasetModuleLogger(org.jboss.modules.log.ModuleLogger)
.
-
EMPTY_CLASS_FILTERS
private static final FastCopyHashSet<ClassFilter> EMPTY_CLASS_FILTERS
-
EMPTY_PATH_FILTERS
private static final FastCopyHashSet<PathFilter> EMPTY_PATH_FILTERS
-
identifier
private final ModuleIdentifier identifier
The identifier of this module.
-
mainClassName
private final java.lang.String mainClassName
The name of the main class, if any (may benull
).
-
moduleClassLoader
private final ModuleClassLoader moduleClassLoader
The module class loader for this module.
-
moduleLoader
private final ModuleLoader moduleLoader
The module loader which created this module.
-
fallbackLoader
private final LocalLoader fallbackLoader
The fallback local loader, if any is defined.
-
properties
private final java.util.Map<java.lang.String,java.lang.String> properties
The properties map specified when this module was defined.
-
permissionCollection
private final java.security.PermissionCollection permissionCollection
The assigned permission collection.
-
linkage
private volatile Linkage linkage
The linkage state.
-
GET_DEPENDENCIES
private static final java.lang.RuntimePermission GET_DEPENDENCIES
-
GET_CLASS_LOADER
private static final java.lang.RuntimePermission GET_CLASS_LOADER
-
GET_BOOT_MODULE_LOADER
private static final java.lang.RuntimePermission GET_BOOT_MODULE_LOADER
-
ACCESS_MODULE_LOGGER
private static final java.lang.RuntimePermission ACCESS_MODULE_LOGGER
-
ADD_CONTENT_HANDLER_FACTORY
private static final java.lang.RuntimePermission ADD_CONTENT_HANDLER_FACTORY
-
ADD_URL_STREAM_HANDLER_FACTORY
private static final java.lang.RuntimePermission ADD_URL_STREAM_HANDLER_FACTORY
-
NO_PERMISSIONS
private static final java.security.PermissionCollection NO_PERMISSIONS
-
-
Constructor Detail
-
Module
Module(ConcreteModuleSpec spec, ModuleLoader moduleLoader)
Construct a new instance from a module specification.- Parameters:
spec
- the module specificationmoduleLoader
- the module loader
-
-
Method Detail
-
getPrivateAccess
public static ModulesPrivateAccess getPrivateAccess()
Private access for module internal code. ThrowsSecurityException
for user code.- Throws:
java.lang.SecurityException
- always
-
noPermissions
private static java.security.PermissionCollection noPermissions()
-
copyPermissions
private static java.security.PermissionCollection copyPermissions(java.security.PermissionCollection permissionCollection)
-
getFallbackLoader
LocalLoader getFallbackLoader()
-
getDependenciesInternal
Dependency[] getDependenciesInternal()
-
getDependencySpecsInternal
DependencySpec[] getDependencySpecsInternal()
-
getClassLoaderPrivate
ModuleClassLoader getClassLoaderPrivate()
-
getDependencies
public DependencySpec[] getDependencies() throws java.lang.SecurityException
Get the current dependencies of this module.- Returns:
- the current dependencies of this module
- Throws:
java.lang.SecurityException
- if a security manager is enabled and the caller does not have thegetDependencies
RuntimePermission
-
getExportedResource
public Resource getExportedResource(java.lang.String rootPath, java.lang.String resourcePath)
Get an exported resource from a specific root in this module.- Parameters:
rootPath
- the module root to searchresourcePath
- the path of the resource- Returns:
- the resource
-
run
public void run(java.lang.String[] args) throws java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Run a module's main class, if any.- Parameters:
args
- the arguments to pass- Throws:
java.lang.NoSuchMethodException
- if there is no main methodjava.lang.reflect.InvocationTargetException
- if the main method failedjava.lang.ClassNotFoundException
- if the main class is not found
-
getIdentifier
public ModuleIdentifier getIdentifier()
Get this module's identifier.- Returns:
- the identifier
-
getModuleLoader
public ModuleLoader getModuleLoader()
Get the module loader which created this module.- Returns:
- the module loader of this module
-
loadService
public <S> java.util.ServiceLoader<S> loadService(java.lang.Class<S> serviceType)
Load a service loader from this module.- Type Parameters:
S
- the service type- Parameters:
serviceType
- the service type class- Returns:
- the service loader
-
loadServiceDirectly
public <S> java.util.ServiceLoader<S> loadServiceDirectly(java.lang.Class<S> serviceType)
Load a service loader from this module, without looking at dependencies.- Type Parameters:
S
- the service type- Parameters:
serviceType
- the service type class- Returns:
- the service loader
-
loadServiceFromCallerModuleLoader
public static <S> java.util.ServiceLoader<S> loadServiceFromCallerModuleLoader(ModuleIdentifier identifier, java.lang.Class<S> serviceType) throws ModuleLoadException
Load a service loader from a module in the caller's module loader. The caller's module loader refers to the loader of the module of the class that calls this method. Note thatloadService(Class)
is more efficient since it does not need to crawl the stack.- Type Parameters:
S
- the the service type- Parameters:
identifier
- the module identifier containing the service loaderserviceType
- the service type class- Returns:
- the loaded service from the caller's module
- Throws:
ModuleLoadException
- if the named module failed to load
-
getClassLoader
public ModuleClassLoader getClassLoader()
Get the class loader for a module. The class loader can be used to access non-exported classes and resources of the module.If a security manager is present, then this method invokes the security manager's
checkPermission
method with aRuntimePermission("getClassLoader")
permission to verify access to the class loader. If access is not granted, aSecurityException
will be thrown.- Returns:
- the module class loader
-
getExportedPaths
public java.util.Set<java.lang.String> getExportedPaths()
Get all the paths exported by this module.- Returns:
- the paths that are exported by this module
-
forClass
public static Module forClass(java.lang.Class<?> clazz)
Get the module for a loaded class, ornull
if the class did not come from any module.- Parameters:
clazz
- the class- Returns:
- the module it came from
-
forClassLoader
public static Module forClassLoader(java.lang.ClassLoader cl, boolean search)
Get the module for a class loader, ornull
if the class loader is not associated with any module. If the class loader is unknown, it is possible to check the parent class loader up the chain, and so on until a module is found.- Parameters:
cl
- the class loadersearch
-true
to search up the delegation chain- Returns:
- the associated module
-
getBootModuleLoader
public static ModuleLoader getBootModuleLoader()
Gets the boot module loader. The boot module loader is the initial loader that is established by the module framework. It typically is based off of the environmental module path unless it is overridden by specifying a different class name for theboot.module.loader
system property.- Returns:
- the boot module loader
-
initBootModuleLoader
static void initBootModuleLoader(ModuleLoader loader)
-
getCallerModuleLoader
public static ModuleLoader getCallerModuleLoader()
Gets the current module loader. The current module loader is the loader of the module from the calling class. Note that this method must crawl the stack to determine this, so other mechanisms are more efficient.- Returns:
- the current module loader, or
null
if this method is called outside of a module
-
getContextModuleLoader
public static ModuleLoader getContextModuleLoader()
Get the current thread's context module loader. This loader is the one which defined the module whose class loader is, or is a parent of, the thread's current context class loader. If there is none, thennull
is returned.- Returns:
- the module loader, or
null
if none is set
-
getModuleFromCallerModuleLoader
public static Module getModuleFromCallerModuleLoader(ModuleIdentifier identifier) throws ModuleLoadException
Get a module from the current module loader. Note that this must crawl the stack to determine this, so other mechanisms are more efficient.- Parameters:
identifier
- the module identifier- Returns:
- the module
- Throws:
ModuleLoadException
- if the module could not be loaded- See Also:
getCallerModuleLoader()
-
getCallerModule
public static Module getCallerModule()
Get the caller's module. The caller's module is the module containing the method that calls this method. Note that this method crawls the stack so other ways of obtaining the module are more efficient.- Returns:
- the current module
-
getModule
public Module getModule(ModuleIdentifier identifier) throws ModuleLoadException
Get the module with the given identifier from the module loader used by this module.- Parameters:
identifier
- the module identifier- Returns:
- the module
- Throws:
ModuleLoadException
- if an error occurs
-
loadClassFromBootModuleLoader
public static java.lang.Class<?> loadClassFromBootModuleLoader(ModuleIdentifier moduleIdentifier, java.lang.String className) throws ModuleLoadException, java.lang.ClassNotFoundException
Load a class from a module in the system module loader.- Parameters:
moduleIdentifier
- the identifier of the module from which the class should be loadedclassName
- the class name to load- Returns:
- the class
- Throws:
ModuleLoadException
- if the module could not be loadedjava.lang.ClassNotFoundException
- if the class could not be loaded- See Also:
getBootModuleLoader()
-
loadClassFromCallerModuleLoader
public static java.lang.Class<?> loadClassFromCallerModuleLoader(ModuleIdentifier moduleIdentifier, java.lang.String className) throws ModuleLoadException, java.lang.ClassNotFoundException
Load a class from a module in the caller's module loader.- Parameters:
moduleIdentifier
- the identifier of the module from which the class should be loadedclassName
- the class name to load- Returns:
- the class
- Throws:
ModuleLoadException
- if the module could not be loadedjava.lang.ClassNotFoundException
- if the class could not be loaded- See Also:
getCallerModuleLoader()
-
loadModuleClass
java.lang.Class<?> loadModuleClass(java.lang.String className, boolean resolve) throws java.lang.ClassNotFoundException
Load a class from a local loader.- Parameters:
className
- the class nameresolve
-true
to resolve the class after definition- Returns:
- the class
- Throws:
java.lang.ClassNotFoundException
-
getResource
java.net.URL getResource(java.lang.String name)
Load a resource from a local loader.- Parameters:
name
- the resource name- Returns:
- the resource URL, or
null
if not found
-
getResourceAsStream
java.io.InputStream getResourceAsStream(java.lang.String name) throws java.io.IOException
Load a resource from a local loader.- Parameters:
name
- the resource name- Returns:
- the resource stream, or
null
if not found - Throws:
java.io.IOException
-
getResources
java.util.Enumeration<java.net.URL> getResources(java.lang.String name)
Load all resources of a given name from a local loader.- Parameters:
name
- the resource name- Returns:
- the enumeration of all the matching resource URLs (may be empty)
-
getExportedResource
public java.net.URL getExportedResource(java.lang.String name)
Get an exported resource URL.- Parameters:
name
- the resource name- Returns:
- the resource, or
null
if it was not found
-
getExportedResources
public java.util.Enumeration<java.net.URL> getExportedResources(java.lang.String name)
Get all exported resource URLs for a resource name.- Parameters:
name
- the resource name- Returns:
- the resource URLs
-
iterateResources
public java.util.Iterator<Resource> iterateResources(PathFilter filter) throws ModuleLoadException
Enumerate all the imported resources in this module, subject to a path filter. The filter applies to the containing path of each resource.- Parameters:
filter
- the filter to apply to the search- Returns:
- the resource iterator (possibly empty)
- Throws:
ModuleLoadException
- if linking a dependency module fails for some reason
-
globResources
public java.util.Iterator<Resource> globResources(java.lang.String glob) throws ModuleLoadException
Enumerate all imported resources in this module which match the given glob expression. The glob applies to the whole resource name.- Parameters:
glob
- the glob to apply- Returns:
- the iterator
- Throws:
ModuleLoadException
- if linking a dependency module fails for some reason
-
getImportedPaths
public java.util.Set<java.lang.String> getImportedPaths() throws ModuleLoadException
Get the (unmodifiable) set of paths which are imported into this module class loader, including local paths. The set will include all paths defined by the module's resource loaders, minus any paths excluded by filters. The set will generally always contain an empty entry (""). The set is unordered and unsorted, and is iterable in O(n) time and accessible in O(1) time.- Returns:
- the set of paths
- Throws:
ModuleLoadException
- if the module was previously unlinked, and there was an exception while linking
-
pathOfClass
static java.lang.String pathOfClass(java.lang.String className)
Get the path name of a class.- Parameters:
className
- the binary name of the class- Returns:
- the parent path
-
pathOf
static java.lang.String pathOf(java.lang.String resourceName)
Get the path name of a resource.- Parameters:
resourceName
- the resource name- Returns:
- the parent path
-
fileNameOfClass
static java.lang.String fileNameOfClass(java.lang.String className)
Get the file name of a class.- Parameters:
className
- the class name- Returns:
- the name of the corresponding class file
-
getProperty
public java.lang.String getProperty(java.lang.String name)
Get the property with the given name, ornull
if none was defined.- Parameters:
name
- the property name- Returns:
- the property value
-
getProperty
public java.lang.String getProperty(java.lang.String name, java.lang.String defaultVal)
Get the property with the given name, or a default value if none was defined.- Parameters:
name
- the property namedefaultVal
- the default value- Returns:
- the property value
-
getPropertyNames
public java.util.List<java.lang.String> getPropertyNames()
Get a copy of the list of property names.- Returns:
- the property names list
-
toString
public java.lang.String toString()
Get the string representation of this module.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the string representation
-
getModuleLogger
public static ModuleLogger getModuleLogger()
Get the logger used by the module system.If a security manager is present, then this method invokes the security manager's
checkPermission
method with aRuntimePermission("accessModuleLogger")
permission to verify access to the module logger. If access is not granted, aSecurityException
will be thrown.- Returns:
- the module logger
-
setModuleLogger
public static void setModuleLogger(ModuleLogger logger)
Change the logger used by the module system.If a security manager is present, then this method invokes the security manager's
checkPermission
method with aRuntimePermission("accessModuleLogger")
permission to verify access to the module logger. If access is not granted, aSecurityException
will be thrown.- Parameters:
logger
- the new logger, must not benull
-
getStartTime
public static long getStartTime()
Return the start time in millis when Module.class was loaded.- Returns:
- start time of Module.class load
-
registerContentHandlerFactoryModule
public static void registerContentHandlerFactoryModule(Module module)
Register an additional module which contains content handlers.If a security manager is present, then this method invokes the security manager's
checkPermission
method with aRuntimePermission("addContentHandlerFactory")
permission to verify access. If access is not granted, aSecurityException
will be thrown.- Parameters:
module
- the module to add
-
registerURLStreamHandlerFactoryModule
public static void registerURLStreamHandlerFactoryModule(Module module)
Register an additional module which contains URL handlers.If a security manager is present, then this method invokes the security manager's
checkPermission
method with aRuntimePermission("addURLStreamHandlerFactory")
permission to verify access. If access is not granted, aSecurityException
will be thrown.- Parameters:
module
- the module to add
-
getPlatformIdentifier
public static java.lang.String getPlatformIdentifier()
Get the platform identifier. This is the string that uniquely identifies the hardware and OS combination for the current running system.- Returns:
- the platform identifier
-
getPermissionCollection
public java.security.PermissionCollection getPermissionCollection()
Get the module's configured permission collection.- Returns:
- the module permission collection
-
addPaths
private long addPaths(Dependency[] dependencies, java.util.Map<java.lang.String,java.util.List<LocalLoader>> map, FastCopyHashSet<PathFilter> filterStack, FastCopyHashSet<ClassFilter> classFilterStack, FastCopyHashSet<PathFilter> resourceFilterStack, java.util.Set<Module.Visited> visited) throws ModuleLoadException
- Throws:
ModuleLoadException
-
createPathFilteredLocalLoader
private LocalLoader createPathFilteredLocalLoader(PathFilter filter, LocalLoader localLoader)
-
createClassFilteredLocalLoader
private LocalLoader createClassFilteredLocalLoader(ClassFilter filter, LocalLoader localLoader)
-
addExportedPaths
private long addExportedPaths(Dependency[] dependencies, java.util.Map<java.lang.String,java.util.List<LocalLoader>> map, FastCopyHashSet<PathFilter> filterStack, FastCopyHashSet<ClassFilter> classFilterStack, FastCopyHashSet<PathFilter> resourceFilterStack, java.util.Set<Module.Visited> visited) throws ModuleLoadException
- Throws:
ModuleLoadException
-
getPaths
java.util.Map<java.lang.String,java.util.List<LocalLoader>> getPaths() throws ModuleLoadException
- Throws:
ModuleLoadException
-
getPathsUnchecked
java.util.Map<java.lang.String,java.util.List<LocalLoader>> getPathsUnchecked()
-
link
void link(Linkage linkage) throws ModuleLoadException
- Throws:
ModuleLoadException
-
relinkIfNecessary
void relinkIfNecessary() throws ModuleLoadException
- Throws:
ModuleLoadException
-
relink
void relink() throws ModuleLoadException
- Throws:
ModuleLoadException
-
setDependencies
void setDependencies(java.util.List<DependencySpec> dependencySpecs)
-
setDependencies
void setDependencies(DependencySpec[] dependencySpecs)
-
calculateDependencies
private Dependency[] calculateDependencies(DependencySpec[] dependencySpecs)
-
getMainClass
java.lang.String getMainClass()
-
getPackage
java.lang.Package getPackage(java.lang.String name)
-
getPackages
java.lang.Package[] getPackages()
-
-