registerService

fun <T : Any> registerService(serviceClass: Class<T>, service: T): Boolean(source)

Register a service for a class.

Parameters

T

Java moment. The type of the service interface

serviceClass

Java moment. The class used to query the service. Should be a super interface of the service

service

The implementation of the service interface


inline fun <T : Any> registerService(service: T): Boolean(source)

Register a service for a class.

Parameters

T

The class used to query the service. Should be a super interface of the service

service

The implementation of the service interface