org.apache.maven.shared.artifact.filter.collection

## Class ArtifactTransitivityFilter

- java.lang.Object
- - org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
  - - org.apache.maven.shared.artifact.filter.collection.ArtifactTransitivityFilter

All Implemented Interfaces:
  ArtifactsFilter

    public class ArtifactTransitivityFilter
    extends AbstractArtifactsFilter

This filter will exclude everything that is not a dependency of the selected artifact.

Version:
  $Id: ArtifactTransitivityFilter.java 744326 2009-02-14 01:09:41Z brianf $
Author:
  Brian Fox

### Constructor Summary

Constructors
Constructor and Description
`ArtifactTransitivityFilter(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.repository.ArtifactRepository local, List remote, org.apache.maven.project.MavenProjectBuilder builder)`
`ArtifactTransitivityFilter(org.apache.maven.model.Dependency dependency, org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.repository.ArtifactRepository local, List remote, org.apache.maven.project.MavenProjectBuilder builder)`

### Method Summary

Methods
`boolean` `artifactIsATransitiveDependency(org.apache.maven.artifact.Artifact artifact)` Compares the artifact to the list of dependencies to see if it is directly included by this project
`Set` `filter(Set artifacts)`

### Methods inherited from class org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter

`isArtifactIncluded`

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

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

### Constructor Detail

#### ArtifactTransitivityFilter

    public ArtifactTransitivityFilter(org.apache.maven.artifact.Artifact artifact,
                              org.apache.maven.artifact.factory.ArtifactFactory factory,
                              org.apache.maven.artifact.repository.ArtifactRepository local,
                              List remote,
                              org.apache.maven.project.MavenProjectBuilder builder)
                               throws org.apache.maven.project.ProjectBuildingException,
                                      org.apache.maven.project.artifact.InvalidDependencyVersionException

Throws:
  `org.apache.maven.project.ProjectBuildingException`
  `org.apache.maven.project.artifact.InvalidDependencyVersionException`

#### ArtifactTransitivityFilter

    public ArtifactTransitivityFilter(org.apache.maven.model.Dependency dependency,
                              org.apache.maven.artifact.factory.ArtifactFactory factory,
                              org.apache.maven.artifact.repository.ArtifactRepository local,
                              List remote,
                              org.apache.maven.project.MavenProjectBuilder builder)
                               throws org.apache.maven.project.ProjectBuildingException,
                                      org.apache.maven.project.artifact.InvalidDependencyVersionException

Throws:
  `org.apache.maven.project.ProjectBuildingException`
  `org.apache.maven.project.artifact.InvalidDependencyVersionException`

### Method Detail

#### filter

    public Set filter(Set artifacts)

#### artifactIsATransitiveDependency

    public boolean artifactIsATransitiveDependency(org.apache.maven.artifact.Artifact artifact)

Compares the artifact to the list of dependencies to see if it is directly included by this project

Parameters:
  `artifact` - representing the item to compare.
Returns:
  true if artifact is a transitive dependency