Class ServiceFinder.DefaultServiceIteratorProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.util.Iterator<java.lang.Class<T>> createClassIterator​(java.lang.Class<T> service, java.lang.String serviceName, java.lang.ClassLoader loader, boolean ignoreOnClassNotFound)
      Iterate over provider classes of a service.
      <T> java.util.Iterator<T> createIterator​(java.lang.Class<T> service, java.lang.String serviceName, java.lang.ClassLoader loader, boolean ignoreOnClassNotFound)
      Iterate over provider instances of a service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultServiceIteratorProvider

        public DefaultServiceIteratorProvider()
    • Method Detail

      • createIterator

        public <T> java.util.Iterator<T> createIterator​(java.lang.Class<T> service,
                                                        java.lang.String serviceName,
                                                        java.lang.ClassLoader loader,
                                                        boolean ignoreOnClassNotFound)
        Description copied from class: ServiceFinder.ServiceIteratorProvider
        Iterate over provider instances of a service.
        Specified by:
        createIterator in class ServiceFinder.ServiceIteratorProvider
        Type Parameters:
        T - the type of the service.
        Parameters:
        service - the service class.
        serviceName - the service name.
        loader - the class loader to utilize when loading provider classes.
        ignoreOnClassNotFound - if true ignore an instance if the corresponding provider class if cannot be found, otherwise throw a ClassNotFoundException.
        Returns:
        the provider instance iterator.
      • createClassIterator

        public <T> java.util.Iterator<java.lang.Class<T>> createClassIterator​(java.lang.Class<T> service,
                                                                              java.lang.String serviceName,
                                                                              java.lang.ClassLoader loader,
                                                                              boolean ignoreOnClassNotFound)
        Description copied from class: ServiceFinder.ServiceIteratorProvider
        Iterate over provider classes of a service.
        Specified by:
        createClassIterator in class ServiceFinder.ServiceIteratorProvider
        Type Parameters:
        T - the type of the service.
        Parameters:
        service - the service class.
        serviceName - the service name.
        loader - the class loader to utilize when loading provider classes.
        ignoreOnClassNotFound - if true ignore the provider class if cannot be found, otherwise throw a ClassNotFoundException.
        Returns:
        the provider class iterator.