Class ConflictResolver.ScopeSelector
java.lang.Object
org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector
- Direct Known Subclasses:
- JavaScopeSelector,- ManagedScopeSelector
- Enclosing class:
- ConflictResolver
An extension point of 
ConflictResolver that determines the effective scope of a dependency from a
 potentially conflicting set of derived scopes. The scope selector gets invoked after the
 ConflictResolver.VersionSelector has picked the winning node.
 Note: Implementations must be stateless.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetInstance(DependencyNode root, DependencyGraphTransformationContext context) Retrieves the scope selector for use during the specified graph transformation.abstract voidDetermines the effective scope of the dependency given byConflictResolver.ConflictContext.getWinner().
- 
Constructor Details- 
ScopeSelectorpublic ScopeSelector()
 
- 
- 
Method Details- 
getInstancepublic ConflictResolver.ScopeSelector getInstance(DependencyNode root, DependencyGraphTransformationContext context) throws RepositoryException Retrieves the scope selector for use during the specified graph transformation. The conflict resolver calls this method once perConflictResolver.transformGraph(DependencyNode, DependencyGraphTransformationContext)invocation to allow implementations to prepare any auxiliary data that is needed for their operation. Given that implementations must be stateless, a new instance needs to be returned to hold such auxiliary data. The default implementation simply returns the current instance which is appropriate for implementations which do not require auxiliary data.- Parameters:
- root- the root node of the (possibly cyclic!) graph to transform, must not be- null
- context- the graph transformation context, must not be- null
- Returns:
- the scope selector to use for the given graph transformation, never null
- Throws:
- RepositoryException- if the instance could not be retrieved
 
- 
selectScopepublic abstract void selectScope(ConflictResolver.ConflictContext context) throws RepositoryException Determines the effective scope of the dependency given byConflictResolver.ConflictContext.getWinner(). Implementations will usually iterateConflictResolver.ConflictContext.getItems(), inspectConflictResolver.ConflictItem.getScopes()and eventually callConflictResolver.ConflictContext.setScope(String)to deliver the effective scope.- Parameters:
- context- the conflict context, must not be- null
- Throws:
- RepositoryException- if the scope selection failed
 
 
-