1 package org.eclipse.aether.collection; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 import java.util.List; 23 24 import org.eclipse.aether.RepositorySystemSession; 25 import org.eclipse.aether.artifact.Artifact; 26 import org.eclipse.aether.graph.Dependency; 27 28 /** 29 * A context used during dependency collection to update the dependency manager, selector and traverser. 30 * 31 * @see DependencyManager#deriveChildManager(DependencyCollectionContext) 32 * @see DependencyTraverser#deriveChildTraverser(DependencyCollectionContext) 33 * @see DependencySelector#deriveChildSelector(DependencyCollectionContext) 34 * @see VersionFilter#deriveChildFilter(DependencyCollectionContext) 35 * @noimplement This interface is not intended to be implemented by clients. 36 * @noextend This interface is not intended to be extended by clients. 37 */ 38 public interface DependencyCollectionContext 39 { 40 41 /** 42 * Gets the repository system session during which the dependency collection happens. 43 * 44 * @return The repository system session, never {@code null}. 45 */ 46 RepositorySystemSession getSession(); 47 48 /** 49 * Gets the artifact whose children are to be processed next during dependency collection. For all nodes but the 50 * root, this is simply shorthand for {@code getDependency().getArtifact()}. In case of the root node however, 51 * {@link #getDependency()} might be {@code null} while the node still has an artifact which serves as its label and 52 * is not to be resolved. 53 * 54 * @return The artifact whose children are going to be processed or {@code null} in case of the root node without 55 * dependency and label. 56 */ 57 Artifact getArtifact(); 58 59 /** 60 * Gets the dependency whose children are to be processed next during dependency collection. 61 * 62 * @return The dependency whose children are going to be processed or {@code null} in case of the root node without 63 * dependency. 64 */ 65 Dependency getDependency(); 66 67 /** 68 * Gets the dependency management information that was contributed by the artifact descriptor of the current 69 * dependency. 70 * 71 * @return The dependency management information, never {@code null}. 72 */ 73 List<Dependency> getManagedDependencies(); 74 75 }