Class 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.ArtifactFilter
    Filter 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 standard ScopeArtifactFilter instances ORed together.
    Version:
    $Id$
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addScope​(java.lang.String scope)
      Enable a new scope, along with its implied scopes, in this filter.
      boolean include​(org.apache.maven.artifact.Artifact artifact)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • compileScope

        private boolean compileScope
      • runtimeScope

        private boolean runtimeScope
      • testScope

        private boolean testScope
      • providedScope

        private boolean providedScope
      • systemScope

        private boolean systemScope
    • 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 be null.
    • 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:
        include in interface org.apache.maven.artifact.resolver.filter.ArtifactFilter