docs: private void sort()
      {
          DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph = new DefaultDirectedWeightedGraph<>(
                      DefaultEdge.class);
  
          for (RuleProvider provider : providers)
          {
              graph.addVertex(provider);
          }
  
          addProviderRelationships(graph);
  
          checkForCycles(graph);
  
          List<RuleProvider> result = new ArrayList<>(this.providers.size());
          TopologicalOrderIterator<RuleProvider, DefaultEdge> iterator = new TopologicalOrderIterator<>(graph);
          while (iterator.hasNext())
          {
              RuleProvider provider = iterator.next();
              result.add(provider);
          }
  
          this.providers = Collections.unmodifiableList(result);
  
          int index = 0;
          for (RuleProvider provider : this.providers)
          {
              if (provider instanceof AbstractRuleProvider)
                  ((AbstractRuleProvider) provider).setExecutionIndex(index++);
          }
      }