Class ScopeFilter
- java.lang.Object
-
- org.apache.maven.shared.artifact.filter.resolve.ScopeFilter
-
- All Implemented Interfaces:
TransformableFilter
public class ScopeFilter extends java.lang.Object implements TransformableFilter
Filter based on scope. Note: There's no logic for inherited scoped- Since:
- 3.0
- Author:
- Robert Scholte
- See Also:
ScopeDependencyFilter
,ScopeDependencyFilter
-
-
Constructor Summary
Constructors Constructor Description ScopeFilter(java.util.Collection<java.lang.String> included, java.util.Collection<java.lang.String> excluded)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ScopeFilter
excluding(java.lang.String... excluded)
Construct a ScopeFilter based on excluded scopesstatic ScopeFilter
excluding(java.util.Collection<java.lang.String> excluded)
Construct a ScopeFilter based on excluded scopesjava.util.Collection<java.lang.String>
getExcluded()
Get the excluded scopesjava.util.Collection<java.lang.String>
getIncluded()
Get the included scopesstatic ScopeFilter
including(java.lang.String... included)
Construct a ScopeFilter based on included scopesstatic ScopeFilter
including(java.util.Collection<java.lang.String> included)
Construct a ScopeFilter based on included scopes<T> T
transform(FilterTransformer<T> transformer)
Transform this filter to a tool specific implementation
-
-
-
Method Detail
-
including
public static ScopeFilter including(java.util.Collection<java.lang.String> included)
Construct a ScopeFilter based on included scopes- Parameters:
included
- the scopes to include, may benull
- Returns:
- the filter, never
null
-
including
public static ScopeFilter including(java.lang.String... included)
Construct a ScopeFilter based on included scopes- Parameters:
included
- the scopes to include, must not benull
- Returns:
- the filter, never
null
-
excluding
public static ScopeFilter excluding(java.util.Collection<java.lang.String> excluded)
Construct a ScopeFilter based on excluded scopes- Parameters:
excluded
- the scopes to exclude, may benull
- Returns:
- the filter, never
null
-
excluding
public static ScopeFilter excluding(java.lang.String... excluded)
Construct a ScopeFilter based on excluded scopes- Parameters:
excluded
- the scopes to exclude, must not benull
- Returns:
- the filter, never
null
-
getExcluded
public final java.util.Collection<java.lang.String> getExcluded()
Get the excluded scopes- Returns:
- the scopes to exclude, may be
null
-
getIncluded
public final java.util.Collection<java.lang.String> getIncluded()
Get the included scopes- Returns:
- the scopes to include, may be
null
-
transform
public <T> T transform(FilterTransformer<T> transformer)
Transform this filter to a tool specific implementation- Specified by:
transform
in interfaceTransformableFilter
- Type Parameters:
T
- The type to be used.- Parameters:
transformer
- the transformer, must not benull
- Returns:
- T.
-
-