public interface Registry
Provides access to services registered by modules or application. The registry is powered by Guice.
Modifier and Type | Method and Description |
---|---|
default <T> T |
require(Class<T> type)
Request a service of the given type.
|
<T> T |
require(com.google.inject.Key<T> key)
Request a service of the given key.
|
default <T> T |
require(String name, Class<T> type)
Request a service of the given type and name.
|
default <T> T |
require(String name, com.google.inject.TypeLiteral<T> type)
Request a service of a given type by a given name.
|
default <T> T |
require(com.google.inject.TypeLiteral<T> type)
Request a service of the given type.
|
@Nonnull default <T> T require(Class<T> type)
T
- Service type.
type
- A service type.
@Nonnull default <T> T require(String name, Class<T> type)
T
- Service type.
name
- A service name.
type
- A service type.
@Nonnull default <T> T require(com.google.inject.TypeLiteral<T> type)
T
- Service type.
type
- A service type.
@Nonnull <T> T require(com.google.inject.Key<T> key)
T
- Service type.
key
- A service key.
Copyright © 2019. All rights reserved.