getService

inline fun <S : Any> ServiceProvider.getService(): S?

Retrieves a service using reified type information. This is a convenience extension that automatically uses the reified type for lookup.

Return

the service instance of type S, or null if not found

Parameters

S

the type of service to retrieve

Samples