org.eclipse.aether.util.graph.transformer

## Class JavaScopeSelector

- java.lang.Object
- - org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector
  - - org.eclipse.aether.util.graph.transformer.JavaScopeSelector

-     public final class JavaScopeSelector
      extends ConflictResolver.ScopeSelector

  A scope selector for use with `ConflictResolver` that supports the scopes from `JavaScopes`. In general, this selector picks the widest scope present among conflicting dependencies where e.g. "compile" is wider than "runtime" which is wider than "test". If however a direct dependency is involved, its scope is selected.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaScopeSelector()` Creates a new instance of this scope selector.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `selectScope(ConflictResolver.ConflictContext context)` Determines the effective scope of the dependency given by `ConflictResolver.ConflictContext.getWinner()`.

    - ### Methods inherited from class org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector

      `getInstance`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JavaScopeSelector

          public JavaScopeSelector()

      Creates a new instance of this scope selector.

  - ### Method Detail

    - #### selectScope

          public void selectScope(ConflictResolver.ConflictContext context)
                           throws RepositoryException

      Description copied from class: `ConflictResolver.ScopeSelector`
      Determines the effective scope of the dependency given by `ConflictResolver.ConflictContext.getWinner()`. Implementations will usually iterate `ConflictResolver.ConflictContext.getItems()`, inspect `ConflictResolver.ConflictItem.getScopes()` and eventually call `ConflictResolver.ConflictContext.setScope(String)` to deliver the effective scope.
      Specified by:
        `selectScope` in class `ConflictResolver.ScopeSelector`
      Parameters:
        `context` - The conflict context, must not be `null`.
      Throws:
        `RepositoryException` - If the scope selection failed.

Copyright © 2010-2013 The Eclipse Foundation. All Rights Reserved.