public class ModuleLoader
extends java.lang.Object
| Constructor and Description |
|---|
ModuleLoader(ModuleManager manager,
Cartographer plugin) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable(Module module)
Disable the module and remove whatever it may be trying to do.
|
ModuleClassLoader |
getClassLoaderFor(Module module)
Get the
ModuleClassLoader for the given module. |
ModuleDescription |
getDescriptionFor(java.io.File file)
Get a
ModuleDescription from a module jar. |
ModuleDescription |
getDescriptionFor(java.io.File file,
java.io.InputStream stream)
Get a ModuleDescription from an input stream.
|
Module |
load(ModuleDescription description)
Load a module with the given description.
|
boolean |
unload(Module module)
Unload the given module and all their classes, does not guarantee that the module's classes are not be in use.
|
public ModuleLoader(ModuleManager manager, Cartographer plugin)
public Module load(ModuleDescription description)
description - A ModuleDescription of the module being loaded. Cannot be null.public boolean unload(Module module)
module - The module to unload. Cannot be null.public void disable(Module module)
module - public ModuleClassLoader getClassLoaderFor(Module module)
ModuleClassLoader for the given module.module - Cannot be null.public ModuleDescription getDescriptionFor(java.io.File file)
ModuleDescription from a module jar.file - The module jar. Cannot be null.public ModuleDescription getDescriptionFor(java.io.File file, java.io.InputStream stream)
file - The file of the module, cannot be null.stream - The stream to read from. Cannot be null.ModuleDescription generated from the stream.