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.ConflictContextThe 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) ObjectThe 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.OptionalitySelectorThe effective optionality selector, i.e.(package private) final List<ConflictResolver.NodeInfo> The stack of node infos for parent nodes, may containnullwhich 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 scopeinvalid input: '&optionality' set or are leftovers from previous removals.(package private) final ConflictResolver.ScopeContextThe scope context passed to the scope deriver, updated as we move along rather than recreated to avoid tmp objects.(package private) final ConflictResolver.ScopeDeriverThe effective scope deriver, i.e.(package private) final ConflictResolver.ScopeSelectorThe 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) intStats counter.(package private) final ConflictResolver.VerbosityFlag whether we should keep losers in the graph to enable visualization/troubleshooting of conflicts.(package private) final ConflictResolver.VersionSelectorThe effective version selector, i.e. -
Constructor Summary
ConstructorsConstructorDescriptionState(DependencyNode root, Map<?, ?> conflictIds, int conflictIdCount, DependencyGraphTransformationContext context) -
Method Summary
Modifier and TypeMethodDescription(package private) voidadd(DependencyNode node) private intdepth()private booleanderiveOptional(DependencyNode node, Object conflictId) private StringderiveScope(DependencyNode node, Object conflictId) (package private) voidfinish()(package private) booleanloser(DependencyNode node, Object conflictId) private ConflictResolver.ConflictItemnewConflictItem(DependencyNode parent, DependencyNode node) private DependencyNodeparent()(package private) voidpop()(package private) voidprepare(Object conflictId, Collection<Object> cyclicPredecessors) (package private) booleanpush(DependencyNode node, Object conflictId) private Stringscope(Dependency dependency) private voidscopes(int parent, Dependency child) (package private) voidwinner()
-
Field Details
-
currentId
Object currentIdThe conflict id currently processed. -
totalConflictItems
int totalConflictItemsStats counter. -
verbosity
Flag 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 scopeinvalid input: '&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 containnullwhich 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
-