Class ServiceLoaderSupplier<E>

  • All Implemented Interfaces:
    Supplier<E[]>
    Direct Known Subclasses:
    ProviderServiceLoaderSupplier

    public class ServiceLoaderSupplier<E>
    extends Object
    implements Supplier<E[]>
    A supplier which uses a service loader to find all instances of the given service, and return them as an array. The result is then cached.
    Author:
    David M. Lloyd
    • Constructor Detail

      • ServiceLoaderSupplier

        public ServiceLoaderSupplier​(Class<E> service,
                                     ClassLoader classLoader)