Class ConflictResolver.ConflictContext
- java.lang.Object
-
- org.eclipse.aether.util.graph.transformer.ConflictResolver.ConflictContext
-
- Enclosing class:
- ConflictResolver
public static final class ConflictResolver.ConflictContext extends java.lang.ObjectA context used to hold information that is relevant for resolving version and scope conflicts.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.ObjectconflictId(package private) java.util.Map<?,?>conflictIds(package private) java.util.Collection<ConflictResolver.ConflictItem>items(package private) java.lang.Booleanoptional(package private) DependencyNoderoot(package private) java.lang.Stringscope(package private) ConflictResolver.ConflictItemwinner
-
Constructor Summary
Constructors Constructor Description 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.ConflictContext(DependencyNode root, java.util.Map<?,?> conflictIds, java.util.Collection<ConflictResolver.ConflictItem> items)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ConflictResolver.ConflictItem>getItems()Gets the collection of conflict items in this context.java.lang.BooleangetOptional()Gets the effective optional flag of the winning dependency.DependencyNodegetRoot()Gets the root node of the dependency graph being transformed.java.lang.StringgetScope()Gets the effective scope of the winning dependency.ConflictResolver.ConflictItemgetWinner()Gets the conflict item which has been selected as the winner among the conflicting dependencies.booleanisIncluded(DependencyNode node)Determines whether the specified dependency node belongs to this conflict context.voidsetOptional(java.lang.Boolean optional)Sets the effective optional flag of the winning dependency.voidsetScope(java.lang.String scope)Sets the effective scope of the winning dependency.voidsetWinner(ConflictResolver.ConflictItem winner)Sets the conflict item which has been selected as the winner among the conflicting dependencies.java.lang.StringtoString()
-
-
-
Field Detail
-
root
final DependencyNode root
-
conflictIds
final java.util.Map<?,?> conflictIds
-
items
final java.util.Collection<ConflictResolver.ConflictItem> items
-
conflictId
java.lang.Object conflictId
-
winner
ConflictResolver.ConflictItem winner
-
scope
java.lang.String scope
-
optional
java.lang.Boolean optional
-
-
Constructor Detail
-
ConflictContext
ConflictContext(DependencyNode root, java.util.Map<?,?> conflictIds, java.util.Collection<ConflictResolver.ConflictItem> items)
-
ConflictContext
public 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.- Parameters:
root- The root node of the dependency graph, must not benull.conflictId- The conflict id for the set of conflicting dependencies in this context, must not benull.conflictIds- The mapping from dependency node to conflict id, must not benull.items- The conflict items in this context, must not benull.
-
-
Method Detail
-
getRoot
public DependencyNode getRoot()
Gets the root node of the dependency graph being transformed.- Returns:
- The root node of the dependeny graph, never
null.
-
isIncluded
public boolean isIncluded(DependencyNode node)
Determines whether the specified dependency node belongs to this conflict context.- Parameters:
node- The dependency node to check, must not benull.- Returns:
trueif the given node belongs to this conflict context,falseotherwise.
-
getItems
public java.util.Collection<ConflictResolver.ConflictItem> getItems()
Gets the collection of conflict items in this context.- Returns:
- The (read-only) collection of conflict items in this context, never
null.
-
getWinner
public ConflictResolver.ConflictItem getWinner()
Gets the conflict item which has been selected as the winner among the conflicting dependencies.- Returns:
- The winning conflict item or
nullif not set yet.
-
setWinner
public void setWinner(ConflictResolver.ConflictItem winner)
Sets the conflict item which has been selected as the winner among the conflicting dependencies.- Parameters:
winner- The winning conflict item, may benull.
-
getScope
public java.lang.String getScope()
Gets the effective scope of the winning dependency.- Returns:
- The effective scope of the winning dependency or
nullif none.
-
setScope
public void setScope(java.lang.String scope)
Sets the effective scope of the winning dependency.- Parameters:
scope- The effective scope, may benull.
-
getOptional
public java.lang.Boolean getOptional()
Gets the effective optional flag of the winning dependency.- Returns:
- The effective optional flag or
nullif none.
-
setOptional
public void setOptional(java.lang.Boolean optional)
Sets the effective optional flag of the winning dependency.- Parameters:
optional- The effective optional flag, may benull.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-