getService

open override fun <S : Any> getService(serviceType: KType): S?

Retrieves a service by its Kotlin type. First tries exact type match, then falls back to subtype matching if no exact match is found.

Return

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

Parameters

S

the type of service to retrieve

serviceType

the Kotlin type to look up


open override fun <S : Any> getService(serviceName: String): S?

Retrieves a service by its registered name. Performs a direct lookup in the named services map.

Return

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

Parameters

S

the type of service to retrieve

serviceName

the name of the service to look up