Interface PluginLoader<T extends Loadable>
- Type Parameters:
T- the type of plugin that this loader handles, which extendsLoadable
- All Known Implementing Classes:
DefaultPluginLoader,ExecutablesPluginLoader,InitializersPluginLoader,LabyrinthPanelsPluginLoader,PluginsLoader,WallStatesPluginLoader
Loadable.
Implementations of this interface are responsible for loading plugins into the system, managing a collection of loaded plugins, and providing access to individual plugins by their identifiers.
Each plugin loader is designed to work with a specific type of Loadable plugin, and
ensures that plugins of this type are properly loaded and accessible for the application.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a specific plugin by its unique identifier.Returns a list of all loaded plugins.voidLoads all plugins of typeTinto the system.
-
Method Details
-
loadPlugins
void loadPlugins()Loads all plugins of typeTinto the system.This method is responsible for discovering, loading, and initializing all plugins that are compatible with this loader.
-
getPlugins
Returns a list of all loaded plugins.This method retrieves all plugins that have been successfully loaded by the loader.
- Returns:
- a list of plugins of type
T
-
getPlugin
Retrieves a specific plugin by its unique identifier.This method allows access to a single plugin by its ID, which is typically the fully qualified class name obtained via
Object.getClass().Class.getName(). If the plugin with the specified ID is not found, it returnsnull.- Parameters:
id- the unique identifier for the plugin, usually the fully qualified class name- Returns:
- the plugin associated with the given ID, or
nullif not found
-