Class DirectScopeDependencySelector

  • All Implemented Interfaces:
    org.eclipse.aether.collection.DependencySelector

    public class DirectScopeDependencySelector
    extends java.lang.Object
    implements org.eclipse.aether.collection.DependencySelector
    A dependency selector that excludes dependencies of an specific Scope which occur beyond level one of the dependency graph.
    Since:
    3.1.0
    See Also:
    Dependency.getScope()
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int depth  
      private java.lang.String scope  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.aether.collection.DependencySelector deriveChildSelector​(org.eclipse.aether.collection.DependencyCollectionContext context)
      Derives a dependency selector for the specified collection context.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      boolean selectDependency​(org.eclipse.aether.graph.Dependency dependency)
      Decides whether the specified dependency should be included in the dependency graph.
      • Methods inherited from class java.lang.Object

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

      • scope

        private final java.lang.String scope
      • depth

        private final int depth
    • Constructor Detail

      • DirectScopeDependencySelector

        public DirectScopeDependencySelector​(java.lang.String scope)
      • DirectScopeDependencySelector

        private DirectScopeDependencySelector​(java.lang.String scope,
                                              int depth)
    • Method Detail

      • selectDependency

        public boolean selectDependency​(org.eclipse.aether.graph.Dependency dependency)
        Decides whether the specified dependency should be included in the dependency graph.
        Specified by:
        selectDependency in interface org.eclipse.aether.collection.DependencySelector
        Parameters:
        dependency - The dependency to check, must not be null.
        Returns:
        false if the dependency should be excluded from the children of the current node, true otherwise.
      • deriveChildSelector

        public org.eclipse.aether.collection.DependencySelector deriveChildSelector​(org.eclipse.aether.collection.DependencyCollectionContext context)
        Derives a dependency selector for the specified collection context. When calculating the child selector, implementors are strongly advised to simply return the current instance if nothing changed to help save memory.
        Specified by:
        deriveChildSelector in interface org.eclipse.aether.collection.DependencySelector
        Parameters:
        context - The dependency collection context, must not be null.
        Returns:
        The dependency selector for the target node, must not be null.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object