Class DirectScopeDependencySelector
- java.lang.Object
-
- org.apache.maven.shared.dependency.graph.internal.DirectScopeDependencySelector
-
- All Implemented Interfaces:
org.eclipse.aether.collection.DependencySelector
public class DirectScopeDependencySelector extends Object implements org.eclipse.aether.collection.DependencySelector
A dependency selector that excludes dependencies of an specific Scope which occur beyond level one of the dependency graph.- Since:
- 3.1.0
- Author:
- Gabriel Belingueres
- See Also:
Dependency.getScope()
-
-
Constructor Summary
Constructors Constructor Description DirectScopeDependencySelector(String scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.aether.collection.DependencySelector
deriveChildSelector(org.eclipse.aether.collection.DependencyCollectionContext context)
Derives a dependency selector for the specified collection context.boolean
equals(Object obj)
int
hashCode()
boolean
selectDependency(org.eclipse.aether.graph.Dependency dependency)
Decides whether the specified dependency should be included in the dependency graph.
-
-
-
Constructor Detail
-
DirectScopeDependencySelector
public DirectScopeDependencySelector(String scope)
-
-
Method Detail
-
selectDependency
public boolean selectDependency(org.eclipse.aether.graph.Dependency dependency)
Decides whether the specified dependency should be included in the dependency graph.- Specified by:
selectDependency
in interfaceorg.eclipse.aether.collection.DependencySelector
- Parameters:
dependency
- The dependency to check, must not benull
.- Returns:
false
if the dependency should be excluded from the children of the current node,true
otherwise.
-
deriveChildSelector
public org.eclipse.aether.collection.DependencySelector deriveChildSelector(org.eclipse.aether.collection.DependencyCollectionContext context)
Derives a dependency selector for the specified collection context. When calculating the child selector, implementors are strongly advised to simply return the current instance if nothing changed to help save memory.- Specified by:
deriveChildSelector
in interfaceorg.eclipse.aether.collection.DependencySelector
- Parameters:
context
- The dependency collection context, must not benull
.- Returns:
- The dependency selector for the target node, must not be
null
.
-
-