utils/src/main/java/org/robolectric/util/inject/ServiceFinder.java
public static <S> ServiceFinder<S> loadInstalled(Class<S> service) {
    ClassLoader cl = ClassLoader.getSystemClassLoader();
    ClassLoader prev = null;
    while (cl != null) {
      prev = cl;
      cl = cl.getParent();
    }
    return load(service, prev);
  }
public static <S> ServiceFinder<S> loadInstalled(Class<S> service) {
    ClassLoader cl = ClassLoader.getSystemClassLoader();
    ClassLoader prev = null;
    while (cl != null) {
      prev = cl;
      cl = cl.getParent();
    }
    return load(service, prev);
  }
public static < S > ServiceFinder < S > loadInstalled ( Class < S > service ) { ClassLoader cl = ClassLoader . getSystemClassLoader ( ) ; ClassLoader prev = null ; while ( cl != null ) { prev = cl ; cl = cl . getParent ( ) ; } return load ( service , prev ) ; }
Creates a new service loader for the given service type, using the
extension class loader.

<p> This convenience method simply locates the extension class loader,
call it <tt><i>extClassLoader</i></tt>, and then returns

<blockquote><pre>
ServiceFinder.load(<i>service</i>, <i>extClassLoader</i>)</pre></blockquote>

<p> If the extension class loader cannot be found then the system class
loader is used; if there is no system class loader then the bootstrap
class loader is used.

<p> This method is intended for use when only installed providers are
desired.  The resulting service will only find and load providers that
have been installed into the current Java virtual machine; providers on
the application's class path will be ignored.

@param  <S> the class of the service type

@param  service
The interface or abstract class representing the service

@return A new service loader
Creates a new service loader for the given service type using the extension class loader .