public interface Registry
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getInstance(Class<T> type)
Returns a singleton instance of the supplied type.
|
<T> T |
getInstanceOrNull(Class<T> type)
Returns a singleton instance of the supplied type.
|
<T> Supplier<T> |
getProvider(Class<T> type)
Returns a provider of instances for the supplied type.
|
<T> T getInstance(Class<T> type)
T - type of instance.type - type of instance.IllegalArgumentException - if the instance of type cannot be found.<T> T getInstanceOrNull(Class<T> type)
T - type of instance.type - type of instance.<T> Supplier<T> getProvider(Class<T> type)
T - type of instance.type - type of instance.