Class Services


  • public class Services
    extends Object
    Helper class to lookup SPI implementations using the ServiceLoader.
    Author:
    Christian Kaltepoth
    • Constructor Detail

      • Services

        public Services()
    • Method Detail

      • get

        public static <E> Collection<E> get​(Class<? extends E> service)
        Lookup implementations of the supplied SPI. Please note that the order in which the implementations will occur in the collection is not specified.
      • getSorted

        public static <E extends WeightedList<E> getSorted​(Class<? extends E> service)
        Lookup implementations of the supplied SPI. This method requires the SPI to extends Weighted and therefore is able to return a sorted list of implementations.