T
- the instance type@FunctionalInterface public static interface BootstrapRegistry.InstanceSupplier<T>
BootstrapRegistry.Scope
Modifier and Type | Method and Description |
---|---|
static <T> BootstrapRegistry.InstanceSupplier<T> |
from(Supplier<T> supplier)
Factory method that can be used to create a
BootstrapRegistry.InstanceSupplier from a
Supplier . |
T |
get(BootstrapContext context)
Factory method used to create the instance when needed.
|
default BootstrapRegistry.Scope |
getScope()
Return the scope of the supplied instance.
|
static <T> BootstrapRegistry.InstanceSupplier<T> |
of(T instance)
Factory method that can be used to create a
BootstrapRegistry.InstanceSupplier for a
given instance. |
default BootstrapRegistry.InstanceSupplier<T> |
withScope(BootstrapRegistry.Scope scope)
Return a new
BootstrapRegistry.InstanceSupplier with an updated BootstrapRegistry.Scope . |
T get(BootstrapContext context)
context
- the BootstrapContext
which may be used to obtain other
bootstrap instances.default BootstrapRegistry.Scope getScope()
default BootstrapRegistry.InstanceSupplier<T> withScope(BootstrapRegistry.Scope scope)
BootstrapRegistry.InstanceSupplier
with an updated BootstrapRegistry.Scope
.scope
- the new scopeBootstrapRegistry.InstanceSupplier
instance with the new scopestatic <T> BootstrapRegistry.InstanceSupplier<T> of(T instance)
BootstrapRegistry.InstanceSupplier
for a
given instance.T
- the instance typeinstance
- the instanceBootstrapRegistry.InstanceSupplier
static <T> BootstrapRegistry.InstanceSupplier<T> from(Supplier<T> supplier)
BootstrapRegistry.InstanceSupplier
from a
Supplier
.T
- the instance typesupplier
- the supplier that will provide the instanceBootstrapRegistry.InstanceSupplier