Class CumulativeScopeArtifactFilter
- java.lang.Object
-
- org.apache.maven.shared.artifact.resolver.CumulativeScopeArtifactFilter
-
- All Implemented Interfaces:
org.apache.maven.artifact.resolver.filter.ArtifactFilter
final class CumulativeScopeArtifactFilter extends java.lang.Object implements org.apache.maven.artifact.resolver.filter.ArtifactFilterFilter 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 standardScopeArtifactFilterinstances ORed together.- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private booleancompileScopeprivate booleanprovidedScopeprivate booleanruntimeScopeprivate booleansystemScopeprivate booleantestScope
-
Constructor Summary
Constructors Constructor Description CumulativeScopeArtifactFilter()Create a new filter with all scopes disabled.CumulativeScopeArtifactFilter(java.lang.String scope)Create a new filter with the specified scope and its implied scopes enabled.CumulativeScopeArtifactFilter(java.util.Collection<java.lang.String> scopes)Create a new filter with the specified scopes and their implied scopes enabled.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddScope(java.lang.String scope)Enable a new scope, along with its implied scopes, in this filter.booleaninclude(org.apache.maven.artifact.Artifact artifact)
-
-
-
Constructor Detail
-
CumulativeScopeArtifactFilter
CumulativeScopeArtifactFilter()
Create a new filter with all scopes disabled.
-
CumulativeScopeArtifactFilter
CumulativeScopeArtifactFilter(java.lang.String scope)
Create a new filter with the specified scope and its implied scopes enabled.- Parameters:
scope- The scope to enable, along with all implied scopes.
-
CumulativeScopeArtifactFilter
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.
-
-
Method Detail
-
addScope
void addScope(java.lang.String scope)
Enable a new scope, along with its implied scopes, in this filter.- Parameters:
scope- The scope to enable, along with all implied scopes.
-
include
public boolean include(org.apache.maven.artifact.Artifact artifact)
- Specified by:
includein interfaceorg.apache.maven.artifact.resolver.filter.ArtifactFilter
-
-