public interface Registry
ServiceRegistry
Modifier and Type | Method and Description |
---|---|
<T> T |
require(Class<T> type)
Provides an instance of the given type.
|
<T> T |
require(Class<T> type,
String name)
Provides an instance of the given type where name matches it.
|
<T> T |
require(ServiceKey<T> key)
Provides an instance of the given type.
|
@Nonnull <T> T require(@Nonnull Class<T> type) throws RegistryException
T
- Object type.type
- Object type.RegistryException
- If there was a runtime failure while providing an instance.@Nonnull <T> T require(@Nonnull Class<T> type, @Nonnull String name) throws RegistryException
T
- Object type.type
- Object type.name
- Object name.RegistryException
- If there was a runtime failure while providing an instance.@Nonnull <T> T require(@Nonnull ServiceKey<T> key) throws RegistryException
T
- Object type.key
- Object key.RegistryException
- If there was a runtime failure while providing an instance.Copyright © 2020. All rights reserved.