1 /*******************************************************************************
2 * Copyright (c) 2010, 2014 Sonatype, Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Sonatype, Inc. - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.aether
.collection
;
13 import org
.eclipse
.aether
.graph
.Dependency
;
16 * Applies dependency management to the dependencies of a dependency node.
18 * <strong>Note:</strong> Implementations must be stateless.
20 * <em>Warning:</em> This hook is called from a hot spot and therefore implementations should pay attention to
21 * performance. Among others, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
23 * @see org.eclipse.aether.RepositorySystemSession#getDependencyManager()
24 * @see org.eclipse.aether.RepositorySystem#collectDependencies(org.eclipse.aether.RepositorySystemSession,
27 public interface DependencyManager
31 * Applies dependency management to the specified dependency.
33 * @param dependency The dependency to manage, must not be {@code null}.
34 * @return The management update to apply to the dependency or {@code null} if the dependency is not managed at all.
36 DependencyManagement
manageDependency( Dependency dependency
);
39 * Derives a dependency manager for the specified collection context. When calculating the child manager,
40 * implementors are strongly advised to simply return the current instance if nothing changed to help save memory.
42 * @param context The dependency collection context, must not be {@code null}.
43 * @return The dependency manager for the dependencies of the target node or {@code null} if dependency management
44 * should no longer be applied.
46 DependencyManager
deriveChildManager( DependencyCollectionContext context
);