public static final class ConflictResolver.ConflictContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.Object |
conflictId |
(package private) java.util.Map<?,?> |
conflictIds |
(package private) java.util.Collection<ConflictResolver.ConflictItem> |
items |
(package private) java.lang.Boolean |
optional |
(package private) DependencyNode |
root |
(package private) java.lang.String |
scope |
(package private) ConflictResolver.ConflictItem |
winner |
Constructor and Description |
---|
ConflictContext(DependencyNode root,
java.util.Map<?,?> conflictIds,
java.util.Collection<ConflictResolver.ConflictItem> items) |
ConflictContext(DependencyNode root,
java.lang.Object conflictId,
java.util.Map<DependencyNode,java.lang.Object> conflictIds,
java.util.Collection<ConflictResolver.ConflictItem> items)
Creates a new conflict context.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<ConflictResolver.ConflictItem> |
getItems()
Gets the collection of conflict items in this context.
|
java.lang.Boolean |
getOptional()
Gets the effective optional flag of the winning dependency.
|
DependencyNode |
getRoot()
Gets the root node of the dependency graph being transformed.
|
java.lang.String |
getScope()
Gets the effective scope of the winning dependency.
|
ConflictResolver.ConflictItem |
getWinner()
Gets the conflict item which has been selected as the winner among the conflicting dependencies.
|
boolean |
isIncluded(DependencyNode node)
Determines whether the specified dependency node belongs to this conflict context.
|
void |
setOptional(java.lang.Boolean optional)
Sets the effective optional flag of the winning dependency.
|
void |
setScope(java.lang.String scope)
Sets the effective scope of the winning dependency.
|
void |
setWinner(ConflictResolver.ConflictItem winner)
Sets the conflict item which has been selected as the winner among the conflicting dependencies.
|
java.lang.String |
toString() |
final DependencyNode root
final java.util.Map<?,?> conflictIds
final java.util.Collection<ConflictResolver.ConflictItem> items
java.lang.Object conflictId
ConflictResolver.ConflictItem winner
java.lang.String scope
java.lang.Boolean optional
ConflictContext(DependencyNode root, java.util.Map<?,?> conflictIds, java.util.Collection<ConflictResolver.ConflictItem> items)
public ConflictContext(DependencyNode root, java.lang.Object conflictId, java.util.Map<DependencyNode,java.lang.Object> conflictIds, java.util.Collection<ConflictResolver.ConflictItem> items)
root
- The root node of the dependency graph, must not be null
.conflictId
- The conflict id for the set of conflicting dependencies in this context, must not be
null
.conflictIds
- The mapping from dependency node to conflict id, must not be null
.items
- The conflict items in this context, must not be null
.public DependencyNode getRoot()
null
.public boolean isIncluded(DependencyNode node)
node
- The dependency node to check, must not be null
.true
if the given node belongs to this conflict context, false
otherwise.public java.util.Collection<ConflictResolver.ConflictItem> getItems()
null
.public ConflictResolver.ConflictItem getWinner()
null
if not set yet.public void setWinner(ConflictResolver.ConflictItem winner)
winner
- The winning conflict item, may be null
.public java.lang.String getScope()
null
if none.public void setScope(java.lang.String scope)
scope
- The effective scope, may be null
.public java.lang.Boolean getOptional()
null
if none.public void setOptional(java.lang.Boolean optional)
optional
- The effective optional flag, may be null
.public java.lang.String toString()
toString
in class java.lang.Object