org.eclipse.aether.util.graph.transformer

## Class ConflictResolver.ConflictItem

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

- Enclosing class:
    ConflictResolver

      public static final class ConflictResolver.ConflictItem
      extends Object

  A conflicting dependency.
  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.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `OPTIONAL_FALSE` Bit flag indicating whether one or more paths consider the dependency non-optional.
    `static int` | `OPTIONAL_TRUE` Bit flag indicating whether one or more paths consider the dependency optional.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConflictResolver.ConflictItem(DependencyNode parent, DependencyNode node, int depth, int optionalities, String... scopes)` Creates a new conflict item with the specified properties.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Dependency` | `getDependency()` Gets the dependency involved in the conflict, short for `getNode.getDependency()`.
    `int` | `getDepth()` Gets the zero-based depth at which the conflicting node occurs in the graph.
    `DependencyNode` | `getNode()` Gets the dependency node involved in the conflict.
    `int` | `getOptionalities()` Gets the derived optionalities of the dependency.
    `Collection<String>` | `getScopes()` Gets the derived scopes of the dependency.
    `boolean` | `isSibling(ConflictResolver.ConflictItem item)` Determines whether the specified conflict item is a sibling of this item.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### OPTIONAL_FALSE

          public static final int OPTIONAL_FALSE

      Bit flag indicating whether one or more paths consider the dependency non-optional.
      See Also:
        Constant Field Values

    - #### OPTIONAL_TRUE

          public static final int OPTIONAL_TRUE

      Bit flag indicating whether one or more paths consider the dependency optional.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ConflictResolver.ConflictItem

          public ConflictResolver.ConflictItem(DependencyNode parent,
                                       DependencyNode node,
                                       int depth,
                                       int optionalities,
                                       String... scopes)

      Creates a new conflict item with the specified properties.
      Parameters:
        `parent` - The parent node of the conflicting dependency, may be `null`.
        `node` - The conflicting dependency, must not be `null`.
        `depth` - The zero-based depth of the conflicting dependency.
        `optionalities` - The optionalities the dependency was encountered with, encoded as a bit field consisting of `OPTIONAL_TRUE` and `OPTIONAL_FALSE`.
        `scopes` - The derived scopes of the conflicting dependency, must not be `null`.
      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.

  - ### Method Detail

    - #### isSibling

          public boolean isSibling(ConflictResolver.ConflictItem item)

      Determines whether the specified conflict item is a sibling of this item.
      Parameters:
        `item` - The other conflict item, must not be `null`.
      Returns:
        `true` if the given item has the same parent as this item, `false` otherwise.

    - #### getNode

          public DependencyNode getNode()

      Gets the dependency node involved in the conflict.
      Returns:
        The involved dependency node, never `null`.

    - #### getDependency

          public Dependency getDependency()

      Gets the dependency involved in the conflict, short for `getNode.getDependency()`.
      Returns:
        The involved dependency, never `null`.

    - #### getDepth

          public int getDepth()

      Gets the zero-based depth at which the conflicting node occurs in the graph. As such, the depth denotes the number of parent nodes. If actually multiple paths lead to the node, the return value denotes the smallest possible depth.
      Returns:
        The zero-based depth of the node in the graph.

    - #### getScopes

          public Collection<String> getScopes()

      Gets the derived scopes of the dependency. In general, the same dependency node could be reached via different paths and each path might result in a different derived scope.
      Returns:
        The (read-only) set of derived scopes of the dependency, never `null`.
      See Also:
        `ConflictResolver.ScopeDeriver`

    - #### getOptionalities

          public int getOptionalities()

      Gets the derived optionalities of the dependency. In general, the same dependency node could be reached via different paths and each path might result in a different derived optionality.
      Returns:
        A bit field consisting of `OPTIONAL_FALSE` and/or `OPTIONAL_TRUE` indicating the derived optionalities the dependency was encountered with.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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