Class ConflictIdSorter
java.lang.Object
org.eclipse.aether.util.graph.transformer.ConflictIdSorter
- All Implemented Interfaces:
DependencyGraphTransformer
A dependency graph transformer that creates a topological sorting of the conflict ids which have been assigned to the
dependency nodes. Conflict ids are sorted according to the dependency relation induced by the dependency graph. This
transformer will query the key
TransformationContextKeys.CONFLICT_IDS
in the transformation context for an
existing mapping of nodes to their conflicts ids. In absence of this map, the transformer will automatically invoke
the ConflictMarker
to calculate the conflict ids. When this transformer has executed, the transformation
context holds a List<Object>
that denotes the topologically sorted conflict ids. The list will be stored
using the key TransformationContextKeys.SORTED_CONFLICT_IDS
. In addition, the transformer will store a
Collection<Collection<Object>>
using the key TransformationContextKeys.CYCLIC_CONFLICT_IDS
that
describes cycles among conflict ids.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiontransformGraph
(DependencyNode node, DependencyGraphTransformationContext context) Transforms the dependency graph denoted by the specified root node.
-
Constructor Details
-
ConflictIdSorter
public ConflictIdSorter()
-
-
Method Details
-
transformGraph
public DependencyNode transformGraph(DependencyNode node, DependencyGraphTransformationContext context) throws RepositoryException Description copied from interface:DependencyGraphTransformer
Transforms the dependency graph denoted by the specified root node. The transformer may directly change the provided input graph or create a new graph, the former is recommended for performance reasons.- Specified by:
transformGraph
in interfaceDependencyGraphTransformer
- Parameters:
node
- The root node of the (possibly cyclic!) graph to transform, must not benull
.context
- The graph transformation context, must not benull
.- Returns:
- The result graph of the transformation, never
null
. - Throws:
RepositoryException
- If the transformation failed.
-