Package org.apache.maven.shared.artifact.filter

## Class PatternIncludesArtifactFilter

- java.lang.Object
- - org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter

All Implemented Interfaces:
  `org.apache.maven.artifact.resolver.filter.ArtifactFilter`, `StatisticsReportingArtifactFilter`

Direct Known Subclasses:
  `PatternExcludesArtifactFilter`

    public class PatternIncludesArtifactFilter
    extends java.lang.Object
    implements org.apache.maven.artifact.resolver.filter.ArtifactFilter, StatisticsReportingArtifactFilter

TODO: include in maven-artifact in future

Author:
  Brett Porter
See Also:
  `StrictPatternIncludesArtifactFilter`

### Constructor Summary

Constructors
`PatternIncludesArtifactFilter​(java.util.Collection<java.lang.String> patterns)`
`PatternIncludesArtifactFilter​(java.util.Collection<java.lang.String> patterns, boolean actTransitively)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `addFilteredArtifactId​(java.lang.String artifactId)`
`protected java.lang.String` `getFilterDescription()`
`protected java.lang.String` `getPatternsAsString()`
`boolean` `hasMissedCriteria()`
`boolean` `include​(org.apache.maven.artifact.Artifact artifact)`
`protected boolean` `patternMatches​(org.apache.maven.artifact.Artifact artifact)`
`protected java.lang.Boolean` `positiveMatch​(org.apache.maven.artifact.Artifact artifact)`
`void` `reportFilteredArtifacts​(org.codehaus.plexus.logging.Logger logger)`
`void` `reportMissedCriteria​(org.codehaus.plexus.logging.Logger logger)`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### PatternIncludesArtifactFilter

    public PatternIncludesArtifactFilter​(java.util.Collection<java.lang.String> patterns)

Parameters:
  `patterns` - The pattern to be used.

#### PatternIncludesArtifactFilter

    public PatternIncludesArtifactFilter​(java.util.Collection<java.lang.String> patterns,
                                         boolean actTransitively)

Parameters:
  `patterns` - The pattern to be used.
  `actTransitively` - transitive yes/no.

### Method Detail

#### include

    public boolean include​(org.apache.maven.artifact.Artifact artifact)

Specified by:
  `include` in interface `org.apache.maven.artifact.resolver.filter.ArtifactFilter`

#### patternMatches

    protected boolean patternMatches​(org.apache.maven.artifact.Artifact artifact)

Parameters:
  `artifact` - to check for.
Returns:
  true if the match is true false otherwise.

#### addFilteredArtifactId

    protected void addFilteredArtifactId​(java.lang.String artifactId)

Parameters:
  `artifactId` - add artifact to the filtered artifacts list.

#### positiveMatch

    protected java.lang.Boolean positiveMatch​(org.apache.maven.artifact.Artifact artifact)

Parameters:
  `artifact` - check for positive match.
Returns:
  true/false.

#### reportMissedCriteria

    public void reportMissedCriteria​(org.codehaus.plexus.logging.Logger logger)

Specified by:
  `reportMissedCriteria` in interface `StatisticsReportingArtifactFilter`
Parameters:
  `logger` - The logger.

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getPatternsAsString

    protected java.lang.String getPatternsAsString()

Returns:
  pattern as a string.

#### getFilterDescription

    protected java.lang.String getFilterDescription()

Returns:
  description.

#### reportFilteredArtifacts

    public void reportFilteredArtifacts​(org.codehaus.plexus.logging.Logger logger)

Specified by:
  `reportFilteredArtifacts` in interface `StatisticsReportingArtifactFilter`
Parameters:
  `logger` - The logger.

#### hasMissedCriteria

    public boolean hasMissedCriteria()

Specified by:
  `hasMissedCriteria` in interface `StatisticsReportingArtifactFilter`
Returns:
  `true` if missed cireteria `false` otherwise.