getRequiredService
Retrieves a required service by name, throwing an exception if not found. This method guarantees that a service is returned or an exception is thrown.
Return
the service instance of type S
Parameters
the type of service to retrieve
the name of the service to look up
Throws
if the service is not found
Samples
Retrieves a required service by Kotlin type, throwing an exception if not found. This method guarantees that a service is returned or an exception is thrown.
Return
the service instance of type S
Parameters
the type of service to retrieve
the Kotlin type to look up
Throws
if the service is not found
Retrieves a required service by Java class, throwing an exception if not found. This method guarantees that a service is returned or an exception is thrown.
Return
the service instance of type S
Parameters
the type of service to retrieve
the Java class to look up
Throws
if the service is not found
Retrieves a required service using reified type information, throwing an exception if not found. This is a convenience extension that automatically uses the reified type for lookup.
Return
the service instance of type S
Parameters
the type of service to retrieve
Throws
if the service is not found