Class DefaultDependencyCycle

  • All Implemented Interfaces:
    org.eclipse.aether.graph.DependencyCycle

    public final class DefaultDependencyCycle
    extends java.lang.Object
    implements org.eclipse.aether.graph.DependencyCycle
    Default implementation of DependencyCycle. Internal helper class for collector implementations.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultDependencyCycle​(java.util.List<org.eclipse.aether.graph.DependencyNode> nodes, int cycleEntry, org.eclipse.aether.graph.Dependency dependency)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int find​(java.util.List<org.eclipse.aether.graph.DependencyNode> nodes, org.eclipse.aether.artifact.Artifact artifact)
      Searches for a node associated with the given artifact.
      java.util.List<org.eclipse.aether.graph.Dependency> getCyclicDependencies()  
      java.util.List<org.eclipse.aether.graph.Dependency> getPrecedingDependencies()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • DefaultDependencyCycle

        public DefaultDependencyCycle​(java.util.List<org.eclipse.aether.graph.DependencyNode> nodes,
                                      int cycleEntry,
                                      org.eclipse.aether.graph.Dependency dependency)
    • Method Detail

      • getPrecedingDependencies

        public java.util.List<org.eclipse.aether.graph.Dependency> getPrecedingDependencies()
        Specified by:
        getPrecedingDependencies in interface org.eclipse.aether.graph.DependencyCycle
      • getCyclicDependencies

        public java.util.List<org.eclipse.aether.graph.Dependency> getCyclicDependencies()
        Specified by:
        getCyclicDependencies in interface org.eclipse.aether.graph.DependencyCycle
      • find

        public static int find​(java.util.List<org.eclipse.aether.graph.DependencyNode> nodes,
                               org.eclipse.aether.artifact.Artifact artifact)
        Searches for a node associated with the given artifact. A version of the artifact is not considered during the search.
        Parameters:
        nodes - a list representing single path in the dependency graph. First element is the root.
        artifact - to find among the parent nodes.
        Returns:
        the index of the node furthest from the root and associated with the given artifact, or -1 if there is no such node.
      • toString

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