Class ConflictResolver.ConflictContext
java.lang.Object
org.eclipse.aether.util.graph.transformer.ConflictResolver.ConflictContext
- Enclosing class:
ConflictResolver
A context used to hold information that is relevant for resolving version and scope conflicts.
- See Also:
- Restriction:
- This class is not intended to be instantiated by clients in production code, the constructor may change without notice and only exists to enable unit testing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Collection<ConflictResolver.ConflictItem> getItems()Gets the collection of conflict items in this context.abstract BooleanGets 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 StringgetScope()Gets the effective scope of the winning dependency.abstract ConflictResolver.ConflictItemGets 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(Boolean optional) Sets the effective optional flag of the winning dependency.abstract voidSets the effective scope of the winning dependency.abstract voidSets the conflict item which has been selected as the winner among the conflicting dependencies.
-
Constructor Details
-
ConflictContext
public ConflictContext()
-
-
Method Details
-
getRoot
Gets the root node of the dependency graph being transformed.- Returns:
- the root node of the dependency graph, never
null
-
isIncluded
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
Gets the collection of conflict items in this context.- Returns:
- the (read-only) collection of conflict items in this context, never
null
-
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
Sets the conflict item which has been selected as the winner among the conflicting dependencies.- Parameters:
winner- the winning conflict item, may benull
-
getScope
Gets the effective scope of the winning dependency.- Returns:
- the effective scope of the winning dependency or
nullif none
-
setScope
Sets the effective scope of the winning dependency.- Parameters:
scope- the effective scope, may benull
-
getOptional
Gets the effective optional flag of the winning dependency.- Returns:
- the effective optional flag or
nullif none
-
setOptional
Sets the effective optional flag of the winning dependency.- Parameters:
optional- the effective optional flag, may benull
-