Class ConflictResolver.State
java.lang.Object
org.eclipse.aether.util.graph.transformer.ConflictResolver.State
- Enclosing class:
- ConflictResolver
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ConflictResolver.ConflictContext
The conflict context passed to the version/scope/optionality selectors, updated as we move along rather than recreated to avoid tmp objects.(package private) final Map<?,
?> The output from the conflict marker(package private) Object
The conflict id currently processed.(package private) final Map<List<DependencyNode>,
ConflictResolver.NodeInfo> The (conceptual) mapping from nodes to extra infos, technically keyed by the node's child list which better captures the identity of a node since we're basically concerned with effects towards children.(package private) final List<ConflictResolver.ConflictItem>
The conflict items we have gathered so far for the current conflict id.(package private) final ConflictResolver.OptionalitySelector
The effective optionality selector, i.e.(package private) final List<ConflictResolver.NodeInfo>
The stack of node infos for parent nodes, may containnull
which is used to disable creating new conflict items when visiting their parent again (conflict items are meant to be unique by parent-node combo).(package private) final List<DependencyNode>
The stack of parent nodes.The stack of derived optional flags for parent nodes.The stack of derived scopes for parent nodes.(package private) final Collection<Object>
The set of conflict ids which could apply to ancestors of nodes with the current conflict id, used to avoid recursion early on.(package private) final Map<Object,
DependencyNode> A mapping from conflict id to winner node, helps to recognize nodes that have their effective scope&optionality set or are leftovers from previous removals.(package private) final ConflictResolver.ScopeContext
The scope context passed to the scope deriver, updated as we move along rather than recreated to avoid tmp objects.(package private) final ConflictResolver.ScopeDeriver
The effective scope deriver, i.e.(package private) final ConflictResolver.ScopeSelector
The effective scope selector, i.e.(package private) final Map<List<DependencyNode>,
Object> The set of nodes on the DFS stack to detect cycles, technically keyed by the node's child list to match the dirty graph structure produced by the dependency collector for cycles.(package private) int
Stats counter.(package private) final boolean
Flag whether we should keep losers in the graph to enable visualization/troubleshooting of conflicts.(package private) final ConflictResolver.VersionSelector
The effective version selector, i.e. -
Constructor Summary
ConstructorsConstructorDescriptionState
(DependencyNode root, Map<?, ?> conflictIds, int conflictIdCount, DependencyGraphTransformationContext context) -
Method Summary
Modifier and TypeMethodDescription(package private) void
add
(DependencyNode node) private int
depth()
private boolean
deriveOptional
(DependencyNode node, Object conflictId) private String
deriveScope
(DependencyNode node, Object conflictId) (package private) void
finish()
(package private) boolean
loser
(DependencyNode node, Object conflictId) private ConflictResolver.ConflictItem
newConflictItem
(DependencyNode parent, DependencyNode node) private DependencyNode
parent()
(package private) void
pop()
(package private) void
prepare
(Object conflictId, Collection<Object> cyclicPredecessors) (package private) boolean
push
(DependencyNode node, Object conflictId) private String
scope
(Dependency dependency) private void
scopes
(int parent, Dependency child) (package private) void
winner()
-
Field Details
-
currentId
Object currentIdThe conflict id currently processed. -
totalConflictItems
int totalConflictItemsStats counter. -
verbose
final boolean verboseFlag whether we should keep losers in the graph to enable visualization/troubleshooting of conflicts. -
resolvedIds
A mapping from conflict id to winner node, helps to recognize nodes that have their effective scope&optionality set or are leftovers from previous removals. -
potentialAncestorIds
The set of conflict ids which could apply to ancestors of nodes with the current conflict id, used to avoid recursion early on. This is basically a superset of the key set of resolvedIds, the additional ids account for cyclic dependencies. -
conflictIds
The output from the conflict marker -
items
The conflict items we have gathered so far for the current conflict id. -
infos
The (conceptual) mapping from nodes to extra infos, technically keyed by the node's child list which better captures the identity of a node since we're basically concerned with effects towards children. -
stack
The set of nodes on the DFS stack to detect cycles, technically keyed by the node's child list to match the dirty graph structure produced by the dependency collector for cycles. -
parentNodes
The stack of parent nodes. -
parentScopes
The stack of derived scopes for parent nodes. -
parentOptionals
The stack of derived optional flags for parent nodes. -
parentInfos
The stack of node infos for parent nodes, may containnull
which is used to disable creating new conflict items when visiting their parent again (conflict items are meant to be unique by parent-node combo). -
conflictCtx
The conflict context passed to the version/scope/optionality selectors, updated as we move along rather than recreated to avoid tmp objects. -
scopeCtx
The scope context passed to the scope deriver, updated as we move along rather than recreated to avoid tmp objects. -
versionSelector
The effective version selector, i.e. after initialization. -
scopeSelector
The effective scope selector, i.e. after initialization. -
scopeDeriver
The effective scope deriver, i.e. after initialization. -
optionalitySelector
The effective optionality selector, i.e. after initialization.
-
-
Constructor Details
-
State
State(DependencyNode root, Map<?, ?> conflictIds, int conflictIdCount, DependencyGraphTransformationContext context) throws RepositoryException- Throws:
RepositoryException
-
-
Method Details
-
prepare
-
finish
void finish() -
winner
void winner() -
loser
-
push
- Throws:
RepositoryException
-
pop
void pop() -
add
- Throws:
RepositoryException
-
newConflictItem
private ConflictResolver.ConflictItem newConflictItem(DependencyNode parent, DependencyNode node) throws RepositoryException - Throws:
RepositoryException
-
depth
private int depth() -
parent
-
deriveScope
- Throws:
RepositoryException
-
scopes
-
scope
-
deriveOptional
-