S
- The service typepublic static final class SoftServiceLoader.StaticDefinition<S> extends Object implements ServiceDefinition<S>
ServiceDefinition
implementation that uses a MethodHandles.Lookup
object to find a public constructor.Modifier and Type | Method and Description |
---|---|
String |
getName() |
boolean |
isPresent() |
S |
load() |
static <S> SoftServiceLoader.StaticDefinition<S> |
of(String name,
Class<S> value) |
static <S> SoftServiceLoader.StaticDefinition<S> |
of(String name,
Supplier<S> value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
orElseThrow
public static <S> SoftServiceLoader.StaticDefinition<S> of(String name, Class<S> value)
public static <S> SoftServiceLoader.StaticDefinition<S> of(String name, Supplier<S> value)
public boolean isPresent()
isPresent
in interface ServiceDefinition<S>
public String getName()
getName
in interface ServiceDefinition<S>
public S load()
load
in interface ServiceDefinition<S>