public interface PluginManager
PluginContainers from
plugin instances and inject arbitrary JAR files into the plugin classpath with addToClasspath(Object, Path).| Modifier and Type | Method and Description |
|---|---|
void |
addToClasspath(Object plugin,
Path path)
Adds the specified
path to the plugin classpath. |
Optional<PluginContainer> |
fromInstance(Object instance)
Gets the plugin container from an instance.
|
Optional<PluginContainer> |
getPlugin(String id)
Retrieves a
PluginContainer based on its ID. |
Collection<PluginContainer> |
getPlugins()
Gets a
Collection of all PluginContainers. |
boolean |
isLoaded(String id)
Checks if a plugin is loaded based on its ID.
|
Optional<PluginContainer> fromInstance(Object instance)
instance - the instanceOptional<PluginContainer> getPlugin(String id)
PluginContainer based on its ID.id - the plugin IDCollection<PluginContainer> getPlugins()
Collection of all PluginContainers.boolean isLoaded(String id)
id - the id of the plugintrue if loadedvoid addToClasspath(Object plugin, Path path)
path to the plugin classpath.plugin - the pluginpath - the path to the JAR you want to inject into the classpathUnsupportedOperationException - if the operation is not applicable to this plugin