public interface RegistryBuilder
| Modifier and Type | Method and Description |
|---|---|
Registry |
build()
Build the registry based on the user configuration.
|
<T> RegistryBuilder |
instance(Class<T> type,
T instance)
Binds an instance to a type.
|
static RegistryBuilder |
newBuilder()
Creates a new builder of this type.
|
<T> RegistryBuilder |
provider(Class<T> type,
Supplier<T> supplier)
Binds a provider of a type.
|
<T> RegistryBuilder instance(Class<T> type, T instance)
T - type of instance.type - type to bind.instance - instance of the type.<T> RegistryBuilder provider(Class<T> type, Supplier<T> supplier)
T - type of instance.type - type to bind.supplier - the supplier (or factory) to create an instance of type.Registry build()
static RegistryBuilder newBuilder()