A service that may or may not be present on the classpath.
- The service typeType Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
getName() @return The full class name of the service |
|
java.lang.Class<T> |
getType() @return The type of the service |
|
boolean |
isPresent() @return is the service present |
|
T |
load() @return load the service |
<X extends Throwable> |
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 supplier
- The exception type