ServiceProvider
Service provider interface for dependency injection and service management in the Wow framework. Provides methods to register services by type and name, and retrieve them when needed. This interface supports both type-based and name-based service resolution.
Implementations should provide thread-safe operations for concurrent access.
Author
ahoo wang
Inheritors
Properties
Functions
Copies all registered services from this provider to the target provider. This is useful for merging service providers or creating combined providers.
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.
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.
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.
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.
Retrieves a service by its registered name. Returns null if no service with the specified name is registered.
Retrieves a service by its Kotlin type. Returns null if no service of the specified type is registered.
Retrieves a service using reified type information. This is a convenience extension that automatically uses the reified type for lookup.
Registers a service instance with the provider. The service can be registered with a custom name and type, or use defaults derived from the service instance.