public interface ServiceDefinition<T>
A service that may or may not be present on the classpath.
T
- The service typeType Params | Return Type | Name and description |
---|---|---|
|
public java.lang.String |
getName()
|
|
public java.lang.Class<T> |
getType()
|
|
public boolean |
isPresent()
|
|
public T |
load()
|
<X extends Throwable> |
public T |
orElseThrow(java.util.function.Supplier<? extends X> exceptionSupplier) Load the service of throw the given exception. |
Load the service of throw the given exception.
exceptionSupplier
- The exception supplierX
- The exception type