org.apache.ivy.core.sort
class ModuleInSort extends Object
isSorted : is true iff this module has already been added to the sorted list.
loopElements : When the module is the root of a loop (=the first element of a
loop met during the sort), loopElements contains all ModuleInSort of the loop
(excluding the root itself.isLoopIntermediateElement : When a loop is detected, all modules included in
the loop (except the root) have isLoopIntermediateElement set to true.caller : During the sort, we traverse recursively the graph. When doing that,
caller point to the parent element.
| Constructor Summary | |
|---|---|
| ModuleInSort(ModuleDescriptor moduleToSort) | |
| Method Summary | |
|---|---|
| void | addToSortedListIfRequired(List sorted)
Add this module to the sorted list except if this module is an intermediary element of a
loop. |
| boolean | checkLoop(ModuleInSort futurCaller, CircularDependencyStrategy depStrategy)
Check if a adding this element as a dependency of caller will introduce a circular
dependency. |
| void | endOfCall() |
| DependencyDescriptor[] | getDependencies() |
| ModuleDescriptor | getSortedModuleDescriptor() |
| boolean | isInLoop() |
| boolean | isProcessed() This ModuleInSort has already been analyzed. |
| boolean | isSorted() This ModuleInSort has been placed on the sorted list |
| static void | logLoopWarning(List loopElement) Log a warning saying that a loop is detected |
| boolean | match(DependencyDescriptor descriptor, VersionMatcher versionMatcher)
Return true if this module match the DependencyDescriptor with the given versionMatcher. |
| void | setCaller(ModuleInSort caller) |
| String | toString() |
Parameters: sorted The list of sorted elements on which this module will be added
Parameters: futurCaller depStrategy
Returns: true if a loop is detected.