final class ConflictResolver.State
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) ConflictResolver.ConflictContext |
conflictCtx
The conflict context passed to the version/scope/optionality selectors, updated as we move along rather than
recreated to avoid tmp objects.
|
(package private) java.util.Map<?,?> |
conflictIds
The output from the conflict marker
|
(package private) java.lang.Object |
currentId
The conflict id currently processed.
|
(package private) java.util.Map<java.util.List<DependencyNode>,ConflictResolver.NodeInfo> |
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.
|
(package private) java.util.List<ConflictResolver.ConflictItem> |
items
The conflict items we have gathered so far for the current conflict id.
|
(package private) ConflictResolver.OptionalitySelector |
optionalitySelector
The effective optionality selector, i.e.
|
(package private) java.util.List<ConflictResolver.NodeInfo> |
parentInfos
The stack of node infos for parent nodes, may contain
null 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) java.util.List<DependencyNode> |
parentNodes
The stack of parent nodes.
|
(package private) java.util.List<java.lang.Boolean> |
parentOptionals
The stack of derived optional flags for parent nodes.
|
(package private) java.util.List<java.lang.String> |
parentScopes
The stack of derived scopes for parent nodes.
|
(package private) java.util.Collection<java.lang.Object> |
potentialAncestorIds
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) java.util.Map<java.lang.Object,DependencyNode> |
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.
|
(package private) ConflictResolver.ScopeContext |
scopeCtx
The scope context passed to the scope deriver, updated as we move along rather than recreated to avoid tmp
objects.
|
(package private) ConflictResolver.ScopeDeriver |
scopeDeriver
The effective scope deriver, i.e.
|
(package private) ConflictResolver.ScopeSelector |
scopeSelector
The effective scope selector, i.e.
|
(package private) java.util.Map<java.util.List<DependencyNode>,java.lang.Object> |
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.
|
(package private) int |
totalConflictItems
Stats counter.
|
(package private) boolean |
verbose
Flag whether we should keep losers in the graph to enable visualization/troubleshooting of conflicts.
|
(package private) ConflictResolver.VersionSelector |
versionSelector
The effective version selector, i.e.
|
Constructor and Description |
---|
State(DependencyNode root,
java.util.Map<?,?> conflictIds,
int conflictIdCount,
DependencyGraphTransformationContext context) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
add(DependencyNode node) |
private int |
depth() |
private boolean |
deriveOptional(DependencyNode node,
java.lang.Object conflictId) |
private java.lang.String |
deriveScope(DependencyNode node,
java.lang.Object conflictId) |
(package private) void |
finish() |
(package private) boolean |
loser(DependencyNode node,
java.lang.Object conflictId) |
private ConflictResolver.ConflictItem |
newConflictItem(DependencyNode parent,
DependencyNode node) |
private DependencyNode |
parent() |
(package private) void |
pop() |
(package private) void |
prepare(java.lang.Object conflictId,
java.util.Collection<java.lang.Object> cyclicPredecessors) |
(package private) boolean |
push(DependencyNode node,
java.lang.Object conflictId) |
private java.lang.String |
scope(Dependency dependency) |
private void |
scopes(int parent,
Dependency child) |
(package private) void |
winner() |
java.lang.Object currentId
int totalConflictItems
final boolean verbose
final java.util.Map<java.lang.Object,DependencyNode> resolvedIds
final java.util.Collection<java.lang.Object> potentialAncestorIds
final java.util.Map<?,?> conflictIds
final java.util.List<ConflictResolver.ConflictItem> items
final java.util.Map<java.util.List<DependencyNode>,ConflictResolver.NodeInfo> infos
final java.util.Map<java.util.List<DependencyNode>,java.lang.Object> stack
final java.util.List<DependencyNode> parentNodes
final java.util.List<java.lang.String> parentScopes
final java.util.List<java.lang.Boolean> parentOptionals
final java.util.List<ConflictResolver.NodeInfo> parentInfos
null
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).final ConflictResolver.ConflictContext conflictCtx
final ConflictResolver.ScopeContext scopeCtx
final ConflictResolver.VersionSelector versionSelector
final ConflictResolver.ScopeSelector scopeSelector
final ConflictResolver.ScopeDeriver scopeDeriver
final ConflictResolver.OptionalitySelector optionalitySelector
State(DependencyNode root, java.util.Map<?,?> conflictIds, int conflictIdCount, DependencyGraphTransformationContext context) throws RepositoryException
RepositoryException
void prepare(java.lang.Object conflictId, java.util.Collection<java.lang.Object> cyclicPredecessors)
void finish()
void winner()
boolean loser(DependencyNode node, java.lang.Object conflictId)
boolean push(DependencyNode node, java.lang.Object conflictId) throws RepositoryException
RepositoryException
void pop()
void add(DependencyNode node) throws RepositoryException
RepositoryException
private ConflictResolver.ConflictItem newConflictItem(DependencyNode parent, DependencyNode node) throws RepositoryException
RepositoryException
private int depth()
private DependencyNode parent()
private java.lang.String deriveScope(DependencyNode node, java.lang.Object conflictId) throws RepositoryException
RepositoryException
private void scopes(int parent, Dependency child)
private java.lang.String scope(Dependency dependency)
private boolean deriveOptional(DependencyNode node, java.lang.Object conflictId)