docs: public static <T> List<T> loadAll(
        Class<T> klass,
        Iterable<Class<?>> hardcoded,
        ClassLoader cl,
        final PriorityAccessor<T> priorityAccessor) {
      Iterable<T> candidates;
      if (isAndroid(cl)) {
        candidates = getCandidatesViaHardCoded(klass, hardcoded);
      } else {
        candidates = getCandidatesViaServiceLoader(klass, cl);
      }
      List<T> list = new ArrayList<>();
      for (T current: candidates) {
        if (!priorityAccessor.isAvailable(current)) {
          continue;
        }
        list.add(current);
      }
  
      // Sort descending based on priority.  If priorities are equal, compare the class names to
      // get a reliable result.
      Collections.sort(list, Collections.reverseOrder(new Comparator<T>() {
        @Override
        public int compare(T f1, T f2) {
          int pd = priorityAccessor.getPriority(f1) - priorityAccessor.getPriority(f2);
          if (pd != 0) {
            return pd;
          }
          return f1.getClass().getName().compareTo(f2.getClass().getName());
        }
      }));
      return Collections.unmodifiableList(list);
    }