Class ConflictResolver.ConflictContext

    • Constructor Summary

      Constructors 
      Constructor Description
      ConflictContext​(org.eclipse.aether.graph.DependencyNode root, java.lang.Object conflictId, java.util.Map<org.eclipse.aether.graph.DependencyNode,​java.lang.Object> conflictIds, java.util.Collection<ConflictResolver.ConflictItem> items)
      Creates a new conflict context.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<ConflictResolver.ConflictItem> getItems()
      Gets the collection of conflict items in this context.
      java.lang.Boolean getOptional()
      Gets the effective optional flag of the winning dependency.
      org.eclipse.aether.graph.DependencyNode getRoot()
      Gets the root node of the dependency graph being transformed.
      java.lang.String getScope()
      Gets the effective scope of the winning dependency.
      ConflictResolver.ConflictItem getWinner()
      Gets the conflict item which has been selected as the winner among the conflicting dependencies.
      boolean isIncluded​(org.eclipse.aether.graph.DependencyNode node)
      Determines whether the specified dependency node belongs to this conflict context.
      void setOptional​(java.lang.Boolean optional)
      Sets the effective optional flag of the winning dependency.
      void setScope​(java.lang.String scope)
      Sets the effective scope of the winning dependency.
      void setWinner​(ConflictResolver.ConflictItem winner)
      Sets the conflict item which has been selected as the winner among the conflicting dependencies.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConflictContext

        public ConflictContext​(org.eclipse.aether.graph.DependencyNode root,
                               java.lang.Object conflictId,
                               java.util.Map<org.eclipse.aether.graph.DependencyNode,​java.lang.Object> conflictIds,
                               java.util.Collection<ConflictResolver.ConflictItem> items)
        Creates a new conflict context.
        Parameters:
        root - The root node of the dependency graph, must not be null.
        conflictId - The conflict id for the set of conflicting dependencies in this context, must not be null.
        conflictIds - The mapping from dependency node to conflict id, must not be null.
        items - The conflict items in this context, 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

      • getRoot

        public org.eclipse.aether.graph.DependencyNode getRoot()
        Gets the root node of the dependency graph being transformed.
        Returns:
        The root node of the dependeny graph, never null.
      • isIncluded

        public 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 be null.
        Returns:
        true if the given node belongs to this conflict context, false otherwise.
      • getItems

        public java.util.Collection<ConflictResolver.ConflictItemgetItems()
        Gets the collection of conflict items in this context.
        Returns:
        The (read-only) collection of conflict items in this context, never null.
      • getWinner

        public ConflictResolver.ConflictItem getWinner()
        Gets the conflict item which has been selected as the winner among the conflicting dependencies.
        Returns:
        The winning conflict item or null if not set yet.
      • setWinner

        public 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 be null.
      • getScope

        public java.lang.String getScope()
        Gets the effective scope of the winning dependency.
        Returns:
        The effective scope of the winning dependency or null if none.
      • setScope

        public void setScope​(java.lang.String scope)
        Sets the effective scope of the winning dependency.
        Parameters:
        scope - The effective scope, may be null.
      • getOptional

        public java.lang.Boolean getOptional()
        Gets the effective optional flag of the winning dependency.
        Returns:
        The effective optional flag or null if none.
      • setOptional

        public void setOptional​(java.lang.Boolean optional)
        Sets the effective optional flag of the winning dependency.
        Parameters:
        optional - The effective optional flag, may be null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object