Class Services

java.lang.Object
org.togglz.core.util.Services

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

    • Services

      public Services()
  • Method Details

    • 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 Weighted> List<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.