Class ConflictResolver.ConflictContext
- java.lang.Object
-
- org.eclipse.aether.util.graph.transformer.ConflictResolver.ConflictContext
-
- Enclosing class:
- ConflictResolver
public abstract static class ConflictResolver.ConflictContext extends java.lang.Object
A context used to hold information that is relevant for resolving version and scope conflicts.
-
-
Constructor Summary
Constructors Constructor Description ConflictContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.util.Collection<ConflictResolver.ConflictItem>getItems()Gets the collection of conflict items in this context.abstract java.lang.BooleangetOptional()Gets the effective optional flag of the winning dependency.abstract org.eclipse.aether.graph.DependencyNodegetRoot()Gets the root node of the dependency graph being transformed.abstract java.lang.StringgetScope()Gets the effective scope of the winning dependency.abstract ConflictResolver.ConflictItemgetWinner()Gets the conflict item which has been selected as the winner among the conflicting dependencies.abstract booleanisIncluded(org.eclipse.aether.graph.DependencyNode node)Determines whether the specified dependency node belongs to this conflict context.abstract voidsetOptional(java.lang.Boolean optional)Sets the effective optional flag of the winning dependency.abstract voidsetScope(java.lang.String scope)Sets the effective scope of the winning dependency.abstract voidsetWinner(ConflictResolver.ConflictItem winner)Sets the conflict item which has been selected as the winner among the conflicting dependencies.
-
-
-
Constructor Detail
-
ConflictContext
public ConflictContext()
-
-
Method Detail
-
getRoot
public abstract org.eclipse.aether.graph.DependencyNode getRoot()
Gets the root node of the dependency graph being transformed.- Returns:
- the root node of the dependency graph, never
null
-
isIncluded
public abstract boolean isIncluded(org.eclipse.aether.graph.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 abstract 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 abstract 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 abstract 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 abstract 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 abstract void setScope(java.lang.String scope)
Sets the effective scope of the winning dependency.- Parameters:
scope- the effective scope, may benull
-
getOptional
public abstract java.lang.Boolean getOptional()
Gets the effective optional flag of the winning dependency.- Returns:
- the effective optional flag or
nullif none
-
setOptional
public abstract void setOptional(java.lang.Boolean optional)
Sets the effective optional flag of the winning dependency.- Parameters:
optional- the effective optional flag, may benull
-
-