| Modifier and Type | Class and Description |
|---|---|
| private static class | ServiceLoaderSpliterator.
the service type. T>An implementation of the |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | characteristics()
Implements java. Returns a set of characteristics of this Spliterator and its elements. |
| public long | estimateSize()
Implements java. Returns an estimate of the number of elements that would be
encountered by a |
| public boolean | tryAdvance(Consumer<? super ServiceLoader.
The action whose operation is performed at-most once action)Implements java. If a remaining element exists: performs the given action on it,
returning |
| public Spliterator | trySplit()
Implements java. If this spliterator can be partitioned, returns a Spliterator covering elements, that will, upon return from this method, not be covered by this Spliterator. |
| iterator | back to summary |
|---|---|
| private final Iterator<T> iterator | |
| ServiceLoaderSpliterator | back to summary |
|---|---|
| public ServiceLoaderSpliterator(ServiceLoader<T> serviceLoader) | |
| characteristics | back to summary |
|---|---|
| public int characteristics() Implements java. Doc from java. Returns a set of characteristics of this Spliterator and its
elements. The result is represented as ORed values from If a Spliterator reports an inconsistent set of characteristics (either those returned from a single invocation or across multiple invocations), no guarantees can be made about any computation using this Spliterator.
| |
| estimateSize | back to summary |
|---|---|
| public long estimateSize() Implements java. Doc from java. Returns an estimate of the number of elements that would be
encountered by a If this Spliterator is
| |
| tryAdvance | back to summary |
|---|---|
| public boolean tryAdvance(Consumer<? super ServiceLoader. Implements java. Doc from java. If a remaining element exists: performs the given action on it,
returning Subsequent behavior of a spliterator is unspecified if the action throws an exception.
| |
| trySplit | back to summary |
|---|---|
| public Spliterator Implements java. Doc from java. If this spliterator can be partitioned, returns a Spliterator covering elements, that will, upon return from this method, not be covered by this Spliterator. If this Spliterator is Unless this Spliterator covers an infinite number of elements,
repeated calls to
This method may return
| |
ServiceLoader.Provider which contains either an instance of the service or
an error to be thrown when someone calls get().
| Modifier and Type | Field and Description |
|---|---|
| private final Throwable | |
| private final T |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public Class |
| error | back to summary |
|---|---|
| private final Throwable error | |
| service | back to summary |
|---|---|
| private final T service | |
| ServiceProvider | back to summary |
|---|---|
| public ServiceProvider(T service) | |
| ServiceProvider | back to summary |
|---|---|
| public ServiceProvider(Throwable error) | |
| get | back to summary |
|---|---|
| public T get() Implements java. Doc from java. Returns an instance of the provider.
| |
| type | back to summary |
|---|---|
| public Class Implements java. Doc from java. Returns the provider type. There is no guarantee that this type is
accessible or that it has a public no-args constructor. The When a module declares that the provider class is created by a
provider factory then this method returns the return type of its
public static "
| |