Class NodeListGenerator
java.lang.Object
org.eclipse.aether.util.graph.visitor.NodeListGenerator
- All Implemented Interfaces:
Consumer<DependencyNode>
Node list generator usable with different traversing strategies. It is wrapped
List
<DependencyNode>
but
offers several transformations, that are handy.- Since:
- 2.0.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(DependencyNode dependencyNode) getArtifacts
(boolean includeUnresolved) Gets the artifacts associated with the list of dependency nodes generated during the graph traversal.Gets a class path by concatenating the artifact files of the visited dependency nodes.getDependencies
(boolean includeUnresolved) Gets the dependencies seen during the graph traversal.getFiles()
Deprecated.getNodes()
Gets the list of dependency nodes that was generated during the graph traversal.Gets the list of dependency nodes that was generated during the graph traversal and havenon-null
DependencyNode.getDependency()
.getPaths()
Gets the files of resolved artifacts seen during the graph traversal.
-
Constructor Details
-
NodeListGenerator
public NodeListGenerator()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<DependencyNode>
-
getNodes
Gets the list of dependency nodes that was generated during the graph traversal.- Returns:
- The list of dependency nodes, never
null
.
-
getNodesWithDependencies
Gets the list of dependency nodes that was generated during the graph traversal and havenon-null
DependencyNode.getDependency()
.- Returns:
- The list of dependency nodes having dependency, never
null
.
-
getDependencies
Gets the dependencies seen during the graph traversal.- Parameters:
includeUnresolved
- Whether unresolved dependencies shall be included in the result or not.- Returns:
- The list of dependencies, never
null
.
-
getArtifacts
Gets the artifacts associated with the list of dependency nodes generated during the graph traversal.- Parameters:
includeUnresolved
- Whether unresolved artifacts shall be included in the result or not.- Returns:
- The list of artifacts, never
null
.
-
getFiles
Deprecated.UsegetPaths()
instead.Gets the files of resolved artifacts seen during the graph traversal.- Returns:
- The list of artifact files, never
null
.
-
getPaths
Gets the files of resolved artifacts seen during the graph traversal.- Returns:
- The list of artifact files, never
null
. - Since:
- 2.0.0
-
getClassPath
Gets a class path by concatenating the artifact files of the visited dependency nodes. Nodes with unresolved artifacts are automatically skipped.- Returns:
- The class path, using the platform-specific path separator, never
null
.
-
getPaths()
instead.