org.apache.ivy.core.sort

Class SortEngine

public class SortEngine extends Object

Constructor Summary
SortEngine(SortEngineSettings settings)
Method Summary
protected CircularDependencyStrategygetCircularStrategy()
protected VersionMatchergetVersionMatcher()
ListsortModuleDescriptors(Collection moduleDescriptors, SortOptions options)
Sorts the given ModuleDescriptors from the less dependent to the more dependent.
ListsortNodes(Collection nodes, SortOptions options)

Constructor Detail

SortEngine

public SortEngine(SortEngineSettings settings)

Method Detail

getCircularStrategy

protected CircularDependencyStrategy getCircularStrategy()

getVersionMatcher

protected VersionMatcher getVersionMatcher()

sortModuleDescriptors

public List sortModuleDescriptors(Collection moduleDescriptors, SortOptions options)
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

sortNodes

public List sortNodes(Collection nodes, SortOptions options)