Class Scope

  • All Implemented Interfaces:

    
    public final class Scope
    
                        

    The scope class puts package dependencies into context.

    • Method Detail

      • getName

         final String getName()

        The respective package manager's native name for the scope, e.g. "compile", "provided" etc. for Maven, or "dependencies", "devDependencies" etc. for NPM.

      • getDependencies

         final Set<PackageReference> getDependencies()

        The set of references to packages in this scope. Note that only the first-order packages in this set actually belong to the scope of name. Transitive dependency packages usually belong to the scope that describes the packages required to compile the product. As an example, if this was the Maven "test" scope, all first-order items in dependencies would be packages required for testing the product. But transitive dependencies would not be test dependencies of the test dependencies, but compile dependencies of test dependencies.

      • contains

         final Boolean contains(Identifier id)

        Return whether the package identified by id is contained as a (transitive) dependency in this scope.