Interface ModuleContainerGroup
- All Superinterfaces:
AutoCloseable
,Closeable
,ContainerGroup
- All Known Subinterfaces:
OutputContainerGroup
A container group implementation that holds zero or more modules.
These modules can be accessed by their module name. Each one holds a separate group of containers, and has the ability to produce a custom class loader.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a container to this group.void
Add a path to this group for a module.Get the module-oriented location.Get all locations that are modules.Find the package container group for the given module.Get the module container impl in this group.getOrCreateModule
(String moduleName) Get thePackageContainerGroup
for a given module name, creating it if it does not yet exist.boolean
hasLocation
(ModuleLocation location) Determine if this group contains a given module.Methods inherited from interface io.github.ascopes.jct.containers.ContainerGroup
contains, getRelease, getServiceLoader
-
Method Details
-
addModule
-
addModule
-
getModule
Find the package container group for the given module.- Parameters:
module
- the module name.- Returns:
- the container group, or
null
if no module was found by that name.
-
getOrCreateModule
Get thePackageContainerGroup
for a given module name, creating it if it does not yet exist.- Parameters:
moduleName
- the module name to look up.- Returns:
- the container group.
-
getLocation
Get the module-oriented location.- Specified by:
getLocation
in interfaceContainerGroup
- Returns:
- the module-oriented location.
-
getLocationsForModules
Get all locations that are modules.- Returns:
- the locations that are modules.
-
getModules
Get the module container impl in this group.- Returns:
- the container implementation.
-
hasLocation
Determine if this group contains a given module.- Parameters:
location
- the module location to look for.- Returns:
true
if present, orfalse
if not.
-