PluginRegistry

The PluginRegistry interface defines the base contract for classes that allow installing and managing engine plugins.

Inheritors

Functions

Link copied to clipboard
abstract fun <C : Any, I : Any> configure(plugin: EnginePlugin<C, I>, configure: C.() -> Unit = { })

Lazily configure a plugin for use.

Link copied to clipboard
fun <C : Any, T : Any> PluginRegistry.getOrInstall(plugin: EnginePlugin<C, T>, configure: C.() -> Unit = { }): T

Returns the installed plugin instance from the registry, or throws IllegalStateException of no plugin instance is found.

Link copied to clipboard
abstract fun <C : Any, I : Any> install(plugin: EnginePlugin<C, I>, configure: C.() -> Unit = { }): I

Install a plugin and configure it.

Link copied to clipboard
abstract fun <T> plugin(key: EnginePlugin.Key<T>): T?

Retrieve a plugin instance identified by the provided key from this registry. If no instance is registered for that key, null will be returned.

Link copied to clipboard

Returns the installed plugin instance from the registry, or null if this plugin is not installed.

Link copied to clipboard

Returns the plugin instance associated with the given key, or throws IllegalStateException of no plugin instance is found.

Returns the installed plugin instance from the registry, or throws IllegalStateException of no plugin instance is found.