Class ExecutablesPluginLoader
java.lang.Object
net.regsirius06.engine.plugins.loaders.DefaultPluginLoader<Executable>
net.regsirius06.engine.plugins.loaders.ExecutablesPluginLoader
- All Implemented Interfaces:
PluginLoader<Executable>
A
PluginLoader implementation for loading Executable plugins.
This class loads executable plugins for a specific core type and provides
additional functionality to filter and retrieve a special "About" executable.
It extends the DefaultPluginLoader to handle the loading of plugins
of type Executable and offers methods to retrieve all executables
as well as a specific "About" executable if available.
-
Field Summary
Fields inherited from class net.regsirius06.engine.plugins.loaders.DefaultPluginLoader
log -
Constructor Summary
ConstructorsConstructorDescriptionExecutablesPluginLoader(@NotNull Class<? extends Core> type) Constructs a newExecutablesPluginLoaderfor the given core type. -
Method Summary
Modifier and TypeMethodDescription@Nullable ExecutablegetAbout()Retrieves the "About" executable plugin, if available.Returns a list of all executable plugins, excluding the one with the name "About".Methods inherited from class net.regsirius06.engine.plugins.loaders.DefaultPluginLoader
getPlugin, loadPlugins
-
Constructor Details
-
ExecutablesPluginLoader
Constructs a newExecutablesPluginLoaderfor the given core type.This constructor initializes the loader and automatically loads the executables using the
DefaultPluginLoader.loadPlugins()method.- Parameters:
type- the core type to associate with the loader
-
-
Method Details
-
getPlugins
Returns a list of all executable plugins, excluding the one with the name "About".The "About" executable is excluded from this list as it serves a specific purpose (typically displaying information about the plugin or application).
- Specified by:
getPluginsin interfacePluginLoader<Executable>- Overrides:
getPluginsin classDefaultPluginLoader<Executable>- Returns:
- a list of executable plugins, excluding the "About" executable
-
getAbout
Retrieves the "About" executable plugin, if available.This method returns the first plugin whose name is "About". If no such plugin is found, it returns
null.- Returns:
- the "About" executable plugin, or
nullif not found
-