public static < T > List < T > getServices ( final Class < T > intf ) { Objects . requireNonNull ( intf ) ; List < T > ret = new LinkedList <> ( ) ; for ( final T t : ServiceLoader . load ( intf ) ) { ret . add ( t ) ; } return ret ; }
Get all advertised service implementations of the specified interface .