|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.module.ModuleSystem sun.module.core.ModuleSystemImpl
public final class ModuleSystemImpl
Module system implementation.
Field Summary | |
---|---|
static ModuleSystem |
INSTANCE
|
Method Summary | |
---|---|
void |
disableModuleDefinition(ModuleDefinition definition)
Disables the specified ModuleDefinition in the
ModuleSystem . |
Module |
getModule(ModuleDefinition definition)
Returns a Module instance for the specified ModuleDefinition
in the ModuleSystem . |
void |
releaseModule(ModuleDefinition definition)
Releases an existing Module instance corresponding to the
specified ModuleDefinition in the ModuleSystem . |
Methods inherited from class java.module.ModuleSystem |
---|
getDefault |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ModuleSystem INSTANCE
Method Detail |
---|
public void releaseModule(ModuleDefinition definition)
ModuleSystem
Module
instance corresponding to the
specified ModuleDefinition
in the ModuleSystem
.
If there is an existing module instance for the specified module
definition, it will never be returned by the ModuleSystem
after this method returns. Further, if that module instance is
imported by other module instances, each of these importing module
instance will also be released.
If there is no module instance corresponding to the module definition, calling this method has no effect.
Module
instances corresponding to the ModuleDefinition
with name that begins with "java.", or from the bootstrap repository
cannot be released.
If a security manager is present, this method calls the security manager's checkPermission method with a ModuleSystemPermission("releaseModule") permission to ensure it's ok to release the existing module instance of the specified module definition.
releaseModule
in class ModuleSystem
definition
- a ModuleDefinition
.public void disableModuleDefinition(ModuleDefinition definition)
ModuleSystem
ModuleDefinition
in the
ModuleSystem
.
The ModuleDefinition is released
and marked to
disallow creation of new Module
instances. Subsequent calls
to getModule
with this ModuleDefinition throw an
IllegalStateException.
ModuleDefinition
with name that begins with "java.",
or from the bootstrap repository cannot be disabled.
If a security manager is present, this method calls the security manager's checkPermission method with a ModuleSystemPermission("disableModuleDefinition") permission to ensure it's ok to disable the specified module definition in the module system.
disableModuleDefinition
in class ModuleSystem
definition
- a ModuleDefinition
.public Module getModule(ModuleDefinition definition) throws ModuleInitializationException
ModuleSystem
Module
instance for the specified ModuleDefinition
in the ModuleSystem
. The module is initialized and ready to use.
If there is an existing module instance for the specified
ModuleDefinition
, that instance is returned. Otherwise, a new module
instance is instantiated and returned.
getModule
in class ModuleSystem
definition
- a ModuleDefinition
Module
instance of the ModuleDefinition
.
ModuleInitializationException
- if the module instance cannot be initialized.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |