Class ResolvedArtifactGraph

java.lang.Object
org.savantbuild.util.HashGraph<ResolvedArtifact,String>
org.savantbuild.dep.graph.ResolvedArtifactGraph
All Implemented Interfaces:
org.savantbuild.util.Graph<ResolvedArtifact,String>

public class ResolvedArtifactGraph extends org.savantbuild.util.HashGraph<ResolvedArtifact,String>
This class is a resolved artifact and dependency version of the Graph. The link between graph nodes is the artifact group type as a String. The nodes contain the resolved artifact's, which include the Path of the artifact on the local file system.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.savantbuild.util.HashGraph

    org.savantbuild.util.HashGraph.HashEdge<T extends Object,U extends Object>, org.savantbuild.util.HashGraph.HashNode<T extends Object,U extends Object>

    Nested classes/interfaces inherited from interface org.savantbuild.util.Graph

    org.savantbuild.util.Graph.BasePath<T extends Object>, org.savantbuild.util.Graph.Edge<T extends Object,U extends Object>, org.savantbuild.util.Graph.EdgeFilter<T extends Object,U extends Object>, org.savantbuild.util.Graph.GraphConsumer<T extends Object,U extends Object>, org.savantbuild.util.Graph.GraphVisitor<T extends Object,U extends Object>, org.savantbuild.util.Graph.Path<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Brute force traverses the graph and locates the Path for the given artifact.
    int
     
    org.savantbuild.lang.Classpath
     
    Outputs this DependencyGraph as a GraphViz DOT file.
     

    Methods inherited from class org.savantbuild.util.HashGraph

    addEdge, addNode, clearEdges, contains, find, find, getInboundEdges, getNode, getOutboundEdges, getPaths, prune, removeEdge, removeNode, size, traverse, traverse, traverseUp, traverseUp, values

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class org.savantbuild.util.HashGraph<ResolvedArtifact,String>
    • getPath

      public Path getPath(ArtifactID id)
      Brute force traverses the graph and locates the Path for the given artifact. This only needs the ArtifactID because this graph will never contain two versions of the same artifact.
      Parameters:
      id - The id.
      Returns:
      The Path or null if the graph doesn't contain the given Artifact.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.savantbuild.util.HashGraph<ResolvedArtifact,String>
    • toClasspath

      public org.savantbuild.lang.Classpath toClasspath()
    • toDOT

      public String toDOT()
      Outputs this DependencyGraph as a GraphViz DOT file.
      Returns:
      The DOT file String.
    • toString

      public String toString()
      Overrides:
      toString in class Object