org.apache.maven.plugin.dependency.utils.filters
Class AbstractArtifactFeatureFilter
java.lang.Object
org.apache.maven.plugin.dependency.utils.filters.AbstractArtifactsFilter
org.apache.maven.plugin.dependency.utils.filters.AbstractArtifactFeatureFilter
- All Implemented Interfaces:
- ArtifactsFilter
- Direct Known Subclasses:
- ArtifactIdFilter, ClassifierFilter, GroupIdFilter, TypeFilter
public abstract class AbstractArtifactFeatureFilter
- extends AbstractArtifactsFilter
This is the common base class of ClassifierFilter and
TypeFilter
- Version:
- $Id: AbstractArtifactFeatureFilter.java 522374
2007-03-25 22:58:03Z brianf $
- Author:
- Richard van der
Hoff
Method Summary |
protected boolean |
compareFeatures(java.lang.String lhs,
java.lang.String rhs)
Allows Feature comparison to be customized |
java.util.Set |
filter(java.util.Set artifacts,
org.apache.maven.plugin.logging.Log log)
This function determines if filtering needs to be
performed. |
protected abstract java.lang.String |
getArtifactFeature(org.apache.maven.artifact.Artifact artifact)
Should return the type or classifier of the given
artifact, so that we can filter it |
java.util.List |
getExcludes()
|
java.util.List |
getIncludes()
|
void |
setExcludes(java.lang.String excludeString)
|
void |
setIncludes(java.lang.String includeString)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractArtifactFeatureFilter
public AbstractArtifactFeatureFilter(java.lang.String include,
java.lang.String exclude,
java.lang.String theFeatureName)
filter
public java.util.Set filter(java.util.Set artifacts,
org.apache.maven.plugin.logging.Log log)
- This function determines if filtering needs to be
performed. Includes are processed before Excludes.
- Parameters:
dependencies
- the set of dependencies to
filter.
- Returns:
- a Set of filtered dependencies.
getArtifactFeature
protected abstract java.lang.String getArtifactFeature(org.apache.maven.artifact.Artifact artifact)
- Should return the type or classifier of the given
artifact, so that we can filter it
- Parameters:
artifact
- artifact to return type or classifier
of
- Returns:
- type or classifier
setExcludes
public void setExcludes(java.lang.String excludeString)
setIncludes
public void setIncludes(java.lang.String includeString)
getExcludes
public java.util.List getExcludes()
- Returns:
- Returns the excludes.
getIncludes
public java.util.List getIncludes()
- Returns:
- Returns the includes.
compareFeatures
protected boolean compareFeatures(java.lang.String lhs,
java.lang.String rhs)
- Allows Feature comparison to be customized
- Parameters:
lhs
- String artifact's featurerhs
- String feature from exclude or include
list
- Returns:
- boolean true if features match
Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.