public final class OptionalDependencySelector extends Object implements DependencySelector
Dependency.isOptional()
Constructor and Description |
---|
OptionalDependencySelector()
Creates a new selector to exclude optional transitive dependencies.
|
Modifier and Type | Method and Description |
---|---|
DependencySelector |
deriveChildSelector(DependencyCollectionContext context)
Derives a dependency selector for the specified collection context.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
selectDependency(Dependency dependency)
Decides whether the specified dependency should be included in the dependency graph.
|
public OptionalDependencySelector()
public boolean selectDependency(Dependency dependency)
DependencySelector
selectDependency
in interface DependencySelector
dependency
- The dependency to check, must not be null
.false
if the dependency should be excluded from the children of the current node, true
otherwise.public DependencySelector deriveChildSelector(DependencyCollectionContext context)
DependencySelector
deriveChildSelector
in interface DependencySelector
context
- The dependency collection context, must not be null
.null
if dependencies should be unconditionally
included in the sub graph.Copyright © 2010–2018 The Apache Software Foundation. All rights reserved.