Package org.savantbuild.dep.graph
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>
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetPath(ArtifactID id) Brute force traverses the graph and locates the Path for the given artifact.inthashCode()org.savantbuild.lang.ClasspathtoDOT()Outputs this DependencyGraph as a GraphViz DOT file.toString()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
-
Field Details
-
root
-
-
Constructor Details
-
ResolvedArtifactGraph
-
-
Method Details
-
equals
- Overrides:
equalsin classorg.savantbuild.util.HashGraph<ResolvedArtifact,String>
-
getPath
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:
hashCodein classorg.savantbuild.util.HashGraph<ResolvedArtifact,String>
-
toClasspath
public org.savantbuild.lang.Classpath toClasspath() -
toDOT
Outputs this DependencyGraph as a GraphViz DOT file.- Returns:
- The DOT file String.
-
toString
-