Package org.apache.maven.api
Interface Node
Represents a dependency node within a Maven project's dependency collector.
- Since:
- 4.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(NodeVisitor visitor) Traverses this node and potentially its children using the specified visitor.asString()
Returns a string representation of this dependency node.Returns a new tree starting at this node, filtering the children.Gets the child nodes of this node.The repository where this artifact has been downloaded from.stream()
Obtain a Stream containing this node and all its descendant.
-
Method Details
-
getArtifact
- Returns:
- artifact for this node
-
getDependency
- Returns:
- dependency for this node
-
getChildren
Gets the child nodes of this node.- Returns:
- the child nodes of this node, never
null
-
getRemoteRepositories
- Returns:
- repositories of this node
-
getRepository
The repository where this artifact has been downloaded from. -
accept
Traverses this node and potentially its children using the specified visitor.- Parameters:
visitor
- the visitor to call back, must not benull
- Returns:
true
to visit siblings nodes of this node as well,false
to skip siblings
-
filter
Returns a new tree starting at this node, filtering the children. Note that this node will not be filtered and only the children and its descendant will be checked.- Parameters:
filter
- the filter to apply- Returns:
- a new filtered graph
-
asString
Returns a string representation of this dependency node.- Returns:
- the string representation
-
stream
Obtain a Stream containing this node and all its descendant.- Returns:
- a stream containing this node and its descendant
-