T - The service typepublic interface ServiceDefinition<T>
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
default boolean |
isPresent() |
T |
load() |
default <X extends Throwable> |
orElseThrow(Supplier<? extends X> exceptionSupplier)
Load the service of throw the given exception.
|
String getName()
default boolean isPresent()
default <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X extends Throwable
X - The exception typeexceptionSupplier - The exception supplierX - The exception concrete typeX extends ThrowableT load()