Class CumulativeScopeArtifactFilter
- java.lang.Object
-
- org.apache.maven.artifact.resolver.filter.AbstractScopeArtifactFilter
-
- org.apache.maven.artifact.resolver.filter.CumulativeScopeArtifactFilter
-
- All Implemented Interfaces:
ArtifactFilter
public class CumulativeScopeArtifactFilter extends AbstractScopeArtifactFilter
Filter to only retain objects in the given scope or better. This implementation allows the accumulation of multiple scopes and their associated implied scopes, so that the user can filter apply a series of implication rules in a single step. This should be a more efficient implementation of multiple standardScopeArtifactFilter
instances ORed together.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<java.lang.String>
scopes
-
Constructor Summary
Constructors Constructor Description CumulativeScopeArtifactFilter(java.util.Collection<java.lang.String> scopes)
Create a new filter with the specified scopes and their implied scopes enabled.CumulativeScopeArtifactFilter(CumulativeScopeArtifactFilter... filters)
Creates a new filter that combines the specified filters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addScope(java.lang.String scope)
private void
addScopes(java.util.Collection<java.lang.String> scopes)
boolean
equals(java.lang.Object obj)
java.util.Set<java.lang.String>
getScopes()
int
hashCode()
-
Methods inherited from class org.apache.maven.artifact.resolver.filter.AbstractScopeArtifactFilter
addScopeInternal, include
-
-
-
-
Constructor Detail
-
CumulativeScopeArtifactFilter
public CumulativeScopeArtifactFilter(java.util.Collection<java.lang.String> scopes)
Create a new filter with the specified scopes and their implied scopes enabled.- Parameters:
scopes
- The scopes to enable, along with all implied scopes, may benull
.
-
CumulativeScopeArtifactFilter
public CumulativeScopeArtifactFilter(CumulativeScopeArtifactFilter... filters)
Creates a new filter that combines the specified filters.- Parameters:
filters
- The filters to combine, may benull
.
-
-
Method Detail
-
addScopes
private void addScopes(java.util.Collection<java.lang.String> scopes)
-
addScope
private void addScope(java.lang.String scope)
-
getScopes
public java.util.Set<java.lang.String> getScopes()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-