Class SortEngine


  • public class SortEngine
    extends java.lang.Object
    • Method Detail

      • sortModuleDescriptors

        public java.util.List<ModuleDescriptor> sortModuleDescriptors​(java.util.Collection<ModuleDescriptor> moduleDescriptors,
                                                                      SortOptions options)
                                                               throws CircularDependencyException
        Sorts the given ModuleDescriptors from the less dependent to the more dependent. This sort ensures that a ModuleDescriptor is always found in the list before all ModuleDescriptors depending directly on it.
        Parameters:
        moduleDescriptors - a Collection of ModuleDescriptor to sort
        options - Options to use to sort the descriptors.
        Returns:
        a List of sorted ModuleDescriptors
        Throws:
        CircularDependencyException - if a circular dependency exists and circular dependency strategy decide to throw an exception