public class ScopeDependencySelector extends Object implements DependencySelector
Dependency.getScope()
Constructor and Description |
---|
ScopeDependencySelector(Collection<String> included,
Collection<String> excluded)
Creates a new selector using the specified includes and excludes.
|
ScopeDependencySelector(String... excluded)
Creates a new selector using the specified excludes.
|
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)
Applies exclusions to the specified dependency.
|
public ScopeDependencySelector(Collection<String> included, Collection<String> excluded)
included
- The set of scopes to include, may be null
or empty to include any scope.excluded
- The set of scopes to exclude, may be null
or empty to exclude no scope.public ScopeDependencySelector(String... excluded)
excluded
- The set of scopes to exclude, may be null
or empty to exclude no scope.public boolean selectDependency(Dependency dependency)
DependencySelector
selectDependency
in interface DependencySelector
dependency
- The dependency to filter, 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
.Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.