code: public static <E extends Weighted> List<E> getSorted(Class<? extends E> service) {
          List<E> result = new ArrayList<E>(get(service));
          Collections.sort(result, WEIGHTED_COMPARATOR);
          return result;
      }
docs: Lookup implementations of the supplied SPI. This method requires the SPI to extends {@link Weighted} and therefore is
  able to return a sorted list of implementations.