ServiceProvider

interface ServiceProvider<T>

Represents a provider of a service of type T.

Plugins can use these to provide classes to other plugins in a way that allows them to not need to know who they are actually providing the service to (if anyone), which is a neat abstraction layer.

Properties

Link copied to clipboard
@get:JvmName(name = "plugin")
abstract val plugin: PluginContainer

The plugin that provided this service.

Link copied to clipboard
@get:JvmName(name = "service")
abstract val service: T

The service provided.

Link copied to clipboard
@get:JvmName(name = "type")
abstract val type: Class<T>

The class of the service being provided.