Lines Matching defs:Provider

126  * method to yield instances of {@code Provider<CodecFactory>} in contrast to
133 * .map(Provider::get) // Note c
137 * <li> A stream of {@code Provider<CodecFactory>} objects </li>
185 * the service loader's iterator, or via {@link Provider Provider} objects in
411 private Iterator<Provider<S>> lookupIterator1;
415 private Iterator<Provider<S>> lookupIterator2;
416 private final List<Provider<S>> loadedProviders = new ArrayList<>();
431 * then the elements are of type {@code Provider}. This allows processing
439 public static interface Provider<S> extends Supplier<S> {
678 * A Provider implementation that supports invoking, with reduced
682 private static class ProviderImpl<S> implements Provider<S> {
800 "Provider " + cn + " could not be instantiated", exc);
836 private Provider<S> loadProvider(ServiceProvider provider) {
862 fail(service, "Provider " + cn + " not found");
902 implements Iterator<Provider<T>>
908 Provider<T> nextProvider;
946 Provider<T> next = (Provider<T>) loadProvider(provider);
956 public Provider<T> next() {
960 Provider<T> provider = nextProvider;
979 implements Iterator<Provider<T>>
984 Provider<T> nextProvider;
1071 Provider<T> next = (Provider<T>) loadProvider(provider);
1081 public Provider<T> next() {
1085 Provider<T> provider = nextProvider;
1104 implements Iterator<Provider<T>>
1112 Provider<T> nextProvider;
1206 fail(service, "Provider " + cn + " not found");
1240 private Provider<T> nextService() {
1244 Provider<T> provider = nextProvider;
1269 public Provider<T> next() {
1273 PrivilegedAction<Provider<T>> action = new PrivilegedAction<>() {
1274 public Provider<T> run() { return nextService(); }
1284 private Iterator<Provider<S>> newLookupIterator() {
1289 Iterator<Provider<S>> first = new ModuleServicesLookupIterator<>();
1290 Iterator<Provider<S>> second = new LazyClassPathLookupIterator<>();
1291 return new Iterator<Provider<S>>() {
1297 public Provider<S> next() {
1401 * service. The stream elements are of type {@link Provider Provider}, the
1402 * {@code Provider}'s {@link Provider#get() get} method must be invoked to
1427 * .map(Provider::get);
1432 * .map(Provider::get);
1440 public Stream<Provider<S>> stream() {
1452 Spliterator<Provider<S>> s = new ProviderSpliterator<>(lookupIterator2);
1456 private class ProviderSpliterator<T> implements Spliterator<Provider<T>> {
1458 final Iterator<Provider<T>> iterator;
1461 ProviderSpliterator(Iterator<Provider<T>> iterator) {
1466 public Spliterator<Provider<T>> trySplit() {
1472 public boolean tryAdvance(Consumer<? super Provider<T>> action) {
1475 Provider<T> next = null;
1477 next = (Provider<T>) loadedProviders.get(index++);